Skip to content

Commit ee24e99

Browse files
committed
Box::leak - updated documentation
1 parent dabb0c6 commit ee24e99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/boxed.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ impl<T: ?Sized> Box<T> {
365365
unsafe { mem::transmute(b) }
366366
}
367367

368-
/// Consumes and leaks the `Box`, returning a static mutable reference,
369-
/// `&'static mut T`.
368+
/// Consumes and leaks the `Box`, returning a mutable reference,
369+
/// `&'a mut T`. Here, the lifetime `'a` may be chosen to be `'static`.
370370
///
371371
/// This function is mainly useful for data that lives for the remainder of
372372
/// the program's life. Dropping the returned reference will cause a memory

0 commit comments

Comments
 (0)