diff options
Diffstat (limited to 'library/alloc/src/vec/mod.rs')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 6c238fd2d0c..2bf25b3e01c 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1249,7 +1249,8 @@ impl<T, A: Allocator> Vec<T, A> { /// let _ = ptr1.read(); /// let ptr2 = v.as_mut_ptr().offset(2); /// ptr2.write(2); - /// // Notably, the write to `ptr2` did *not* invalidate `ptr1`: + /// // Notably, the write to `ptr2` did *not* invalidate `ptr1` + /// // because it mutated a different element: /// let _ = ptr1.read(); /// } /// ``` |
