From 7b1c5e87b84d24cb46b439db26b345d376442255 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 19 Sep 2024 11:18:00 -0700 Subject: [PATCH] Allow shortening reborrows Generating a call to `as_mut()` let to more restrictive borrows than what reborrowing usually gives us. Instead, we change the desugaring to reborrow the pin internals directly which makes things more expressive. --- core/src/pin.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/pin.rs b/core/src/pin.rs index bb1196e82de78..9c13662e08e8f 100644 --- a/core/src/pin.rs +++ b/core/src/pin.rs @@ -1408,7 +1408,6 @@ impl Pin { /// } /// } /// ``` - #[cfg_attr(not(bootstrap), lang = "pin_as_mut")] #[stable(feature = "pin", since = "1.33.0")] #[inline(always)] pub fn as_mut(&mut self) -> Pin<&mut Ptr::Target> {