extend_lifetime_mut

Function extend_lifetime_mut 

Source
unsafe fn extend_lifetime_mut<'b, T: ?Sized>(r: &mut T) -> &'b mut T
Available on crate features test-utils only.
Expand description

Extends the lifetime of a mutable reference: &'a mut T -> &'b mut T

SAFETY: the caller must ensure the reference remains valid for the extended lifetime.