Skip to content

Commit 84ce206

Browse files
committed
Change PinMut::map to be able to preserve the original reference's lifetime
Suggested by @dylanede at <#49150 (comment)>.
1 parent 9f26376 commit 84ce206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ impl<'a, T: ?Sized> PinMut<'a, T> {
11551155
/// because it is one of the fields of that value), and also that you do
11561156
/// not move out of the argument you receive to the interior function.
11571157
#[unstable(feature = "pin", issue = "49150")]
1158-
pub unsafe fn map<'b, U, F>(this: &'b mut PinMut<'a, T>, f: F) -> PinMut<'b, U> where
1158+
pub unsafe fn map<U, F>(this: PinMut<'a, T>, f: F) -> PinMut<'a, U> where
11591159
F: FnOnce(&mut T) -> &mut U
11601160
{
11611161
PinMut { inner: f(this.inner) }

0 commit comments

Comments
 (0)