Box::leak - updated documentation
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user