]> git.lizzy.rs Git - rust.git/commitdiff
Box::leak - updated documentation
authorMazdak <twingoow@gmail.com>
Thu, 9 Nov 2017 22:27:58 +0000 (23:27 +0100)
committerMazdak <twingoow@gmail.com>
Thu, 9 Nov 2017 22:27:58 +0000 (23:27 +0100)
src/liballoc/boxed.rs

index 58e5c4d66e4c2316b92df915199e236e78721aee..49f5f68fa770af12b0da58a520afcea9046a2ce7 100644 (file)
@@ -365,8 +365,8 @@ pub fn into_unique(b: Box<T>) -> Unique<T> {
         unsafe { mem::transmute(b) }
     }
 
-    /// Consumes and leaks the `Box`, returning a static mutable reference,
-    /// `&'static mut T`.
+    /// Consumes and leaks the `Box`, returning a mutable reference,
+    /// `&'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
     /// the program's life. Dropping the returned reference will cause a memory