Skip to content

Commit fe716d0

Browse files
Rollup merge of #76677 - RalfJung:stable-pointers, r=jonas-schievink
note that test_stable_pointers does not reflect a stable guarantee Just to be sure...
2 parents 7b7f6f9 + 71a5c46 commit fe716d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/alloc/tests/vec.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,9 @@ fn test_stable_pointers() {
15111511
// Test that, if we reserved enough space, adding and removing elements does not
15121512
// invalidate references into the vector (such as `v0`). This test also
15131513
// runs in Miri, which would detect such problems.
1514+
// Note that this test does *not* constitute a stable guarantee that all these functions do not
1515+
// reallocate! Only what is explicitly documented at
1516+
// <https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#guarantees> is stably guaranteed.
15141517
let mut v = Vec::with_capacity(128);
15151518
v.push(13);
15161519

0 commit comments

Comments
 (0)