From df15b289f39c497d16fac694c6982fbdfa2e6fe2 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 12 Oct 2021 15:02:52 +0200 Subject: [PATCH] Remove potentially unsound note on reconstructing a leaked Vec. --- library/alloc/src/vec/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 546cd1f631083..632297196caf5 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1955,9 +1955,6 @@ impl Vec { /// 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