Box::leak - updated documentation

This commit is contained in:
Mazdak
2017-11-09 23:27:58 +01:00
parent dabb0c6605
commit ee24e992b6

View File

@@ -365,8 +365,8 @@ impl<T: ?Sized> Box<T> {
unsafe { mem::transmute(b) } unsafe { mem::transmute(b) }
} }
/// Consumes and leaks the `Box`, returning a static mutable reference, /// Consumes and leaks the `Box`, returning a mutable reference,
/// `&'static mut T`. /// `&'a mut T`. Here, the lifetime `'a` may be chosen to be `'static`.
/// ///
/// This function is mainly useful for data that lives for the remainder of /// This function is mainly useful for data that lives for the remainder of
/// the program's life. Dropping the returned reference will cause a memory /// the program's life. Dropping the returned reference will cause a memory