]> git.lizzy.rs Git - rust.git/commitdiff
Alloc vec doc mention cannot undo leak
authorIvan Tham <pickfire@riseup.net>
Sat, 10 Oct 2020 14:12:28 +0000 (22:12 +0800)
committerGitHub <noreply@github.com>
Sat, 10 Oct 2020 14:12:28 +0000 (22:12 +0800)
library/alloc/src/vec.rs

index 3f4a97df08d3864c9199c477efe858c86cf73530..fb43f214461282a2b29798c093ec6588cd3a4ac5 100644 (file)
@@ -1476,7 +1476,8 @@ pub fn resize_with<F>(&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