Skip to content

Commit

Permalink
Allow shortening reborrows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eholk committed Sep 19, 2024
1 parent 56704d4 commit 7b1c5e8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,6 @@ impl<Ptr: DerefMut> Pin<Ptr> {
/// }
/// }
/// ```
#[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> {
Expand Down

0 comments on commit 7b1c5e8

Please # to comment.