Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 56704d4

Browse files
committedSep 18, 2024
Begin experimental support for pin reborrowing
This commit adds basic support for reborrowing `Pin` types in argument position. At the moment it only supports reborrowing `Pin<&mut T>` as `Pin<&mut T>` by inserting a call to `Pin::as_mut()`, and only in argument position (not as the receiver in a method call).
1 parent 9af97fc commit 56704d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎core/src/pin.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,7 @@ impl<Ptr: DerefMut> Pin<Ptr> {
14081408
/// }
14091409
/// }
14101410
/// ```
1411+
#[cfg_attr(not(bootstrap), lang = "pin_as_mut")]
14111412
#[stable(feature = "pin", since = "1.33.0")]
14121413
#[inline(always)]
14131414
pub fn as_mut(&mut self) -> Pin<&mut Ptr::Target> {

0 commit comments

Comments
 (0)
Please sign in to comment.