Remove potentially unsound note on reconstructing a leaked Vec.

This commit is contained in:
Mara Bos 2021-10-12 15:02:52 +02:00
parent 129af049fe
commit df15b289f3

View file

@ -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