From ee24e992b640d09d31d34938dbe7131db9cb18a9 Mon Sep 17 00:00:00 2001 From: Mazdak Date: Thu, 9 Nov 2017 23:27:58 +0100 Subject: [PATCH] Box::leak - updated documentation --- src/liballoc/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 58e5c4d66e4..49f5f68fa77 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -365,8 +365,8 @@ pub fn into_unique(b: Box) -> Unique { 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 -- 2.44.0