Skip to content

Commit

Permalink
Remove potentially unsound note on reconstructing a leaked Vec.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Oct 12, 2021
1 parent 129af04 commit df15b28
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions library/alloc/src/vec/mod.rs
Expand Up @@ -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
Expand Down

0 comments on commit df15b28

Please sign in to comment.