about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-10-12 15:02:52 +0200
committerMara Bos <m-ou.se@m-ou.se>2021-10-12 15:02:52 +0200
commitdf15b289f39c497d16fac694c6982fbdfa2e6fe2 (patch)
tree590b055cf45bed771e914042271088889fe5b4af /library
parent129af049fef9a9de3ffba1f6b26246b02a360de3 (diff)
downloadrust-df15b289f39c497d16fac694c6982fbdfa2e6fe2.tar.gz
rust-df15b289f39c497d16fac694c6982fbdfa2e6fe2.zip
Remove potentially unsound note on reconstructing a leaked Vec.
Diffstat (limited to 'library')
-rw-r--r--library/alloc/src/vec/mod.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 546cd1f6310..632297196ca 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -1955,9 +1955,6 @@ impl<T, A: Allocator> Vec<T, A> {
     /// As of Rust 1.57, this method does not reallocate or shrink the `Vec`,
     /// so the leaked allocation may include unused capacity that is not part
     /// of the returned slice.
-    /// Unsafe code that later reconstructs or deallocates the `Vec` (for
-    /// example, by calling [`Vec::from_raw_parts`]) must keep track of the
-    /// original capacity.
     ///
     /// 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