From: Ivan Tham Date: Sat, 10 Oct 2020 14:12:28 +0000 (+0800) Subject: Alloc vec doc mention cannot undo leak X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=66369a6c70d470872f0a64633e71d91e5385a6c6;p=rust.git Alloc vec doc mention cannot undo leak --- diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs index 3f4a97df08d..fb43f214461 100644 --- a/library/alloc/src/vec.rs +++ b/library/alloc/src/vec.rs @@ -1476,7 +1476,8 @@ pub fn resize_with(&mut self, new_len: usize, f: F) /// `'a`. If the type has only static references, or none at all, then this /// may be chosen to be `'static`. /// - /// This function is similar to the [`leak`][Box::leak] function on [`Box`]. + /// This function is similar to the [`leak`][Box::leak] function on [`Box`] + /// except there are no way to undo the leak yet. /// /// 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