Skip to content

Commit

Permalink
PinMut::get_mut can also preserve the lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 7, 2018
1 parent 84ce206 commit 17206a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/mem.rs
Expand Up @@ -1141,7 +1141,7 @@ impl<'a, T: ?Sized> PinMut<'a, T> {
/// the data out of the mutable reference you receive when you call this
/// function.
#[unstable(feature = "pin", issue = "49150")]
pub unsafe fn get_mut<'b>(this: &'b mut PinMut<'a, T>) -> &'b mut T {
pub unsafe fn get_mut(this: PinMut<'a, T>) -> &'a mut T {
this.inner
}

Expand Down

0 comments on commit 17206a7

Please sign in to comment.