PinMut::get_mut can also preserve the lifetime

This commit is contained in:
Ralf Jung 2018-05-07 13:20:30 +02:00
parent 84ce206db6
commit 17206a7e64

@ -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
}