Skip to content

Commit

Permalink
Rollup merge of #76677 - RalfJung:stable-pointers, r=jonas-schievink
Browse files Browse the repository at this point in the history
note that test_stable_pointers does not reflect a stable guarantee

Just to be sure...
  • Loading branch information
jonas-schievink authored Sep 13, 2020
2 parents 7b7f6f9 + 71a5c46 commit fe716d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/alloc/tests/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,9 @@ fn test_stable_pointers() {
// Test that, if we reserved enough space, adding and removing elements does not
// invalidate references into the vector (such as `v0`). This test also
// runs in Miri, which would detect such problems.
// Note that this test does *not* constitute a stable guarantee that all these functions do not
// reallocate! Only what is explicitly documented at
// <https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#guarantees> is stably guaranteed.
let mut v = Vec::with_capacity(128);
v.push(13);

Expand Down

0 comments on commit fe716d0

Please sign in to comment.