Skip to content

Commit

Permalink
Rollup merge of rust-lang#41535 - steveklabnik:gh37746, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix up vec guarnatee around capacity

Fixes rust-lang#37746

r? @rust-lang/libs
  • Loading branch information
frewsxcv authored Apr 26, 2017
2 parents e2a0467 + 19b7272 commit 1fd8ba9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ use Bound::{Excluded, Included, Unbounded};
/// removed data to be erased for security purposes. Even if you drop a `Vec`, its
/// buffer may simply be reused by another `Vec`. Even if you zero a `Vec`'s memory
/// first, that may not actually happen because the optimizer does not consider
/// this a side-effect that must be preserved.
/// this a side-effect that must be preserved. There is one case which we will
/// not break, however: using `unsafe` code to write to the excess capacity,
/// and then increasing the length to match, is always valid.
///
/// `Vec` does not currently guarantee the order in which elements are dropped
/// (the order has changed in the past, and may change again).
Expand Down

0 comments on commit 1fd8ba9

Please sign in to comment.