diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-09-13 20:21:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-13 20:21:24 +0200 |
| commit | fe716d0447208825de8ddb815b31905d905950c7 (patch) | |
| tree | a81dee2e5024531545a22108aabc1d7415776f49 | |
| parent | 7b7f6f919df54fda2655ac228b836e3c9701e7f7 (diff) | |
| parent | 71a5c464d15c9e839cebc8f7a46e88fbb762fdc4 (diff) | |
| download | rust-fe716d0447208825de8ddb815b31905d905950c7.tar.gz rust-fe716d0447208825de8ddb815b31905d905950c7.zip | |
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...
| -rw-r--r-- | library/alloc/tests/vec.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 53b0d0a2718..5f7a9399453 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -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); |
