Skip to content

Commit 6ca8cbb

Browse files
Adapt pin! to the new lifespan-extension rules of 2024 edition
I *believe* this ought to be fixing rust-lang#138596
1 parent 8279176 commit 6ca8cbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2014,5 +2014,5 @@ pub macro pin($value:expr $(,)?) {
20142014
//
20152015
// See https://doc.rust-lang.org/1.58.1/reference/destructors.html#temporary-lifetime-extension
20162016
// for more info.
2017-
$crate::pin::Pin::<&mut _> { __pointer: &mut { $value } }
2017+
$crate::pin::Pin::<&mut _> { __pointer: &mut $crate::convert::identity($value) }
20182018
}

0 commit comments

Comments
 (0)