Skip to content

Commit 6c6875d

Browse files
Update library/alloc/src/vec/mod.rs
Co-authored-by: Ralf Jung <[email protected]>
1 parent 5bf1bfd commit 6c6875d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/alloc/src/vec/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,8 @@ impl<T, A: Allocator> Vec<T, A> {
12491249
/// let _ = ptr1.read();
12501250
/// let ptr2 = v.as_mut_ptr().offset(2);
12511251
/// ptr2.write(2);
1252-
/// // Notably, the write to `ptr2` did *not* invalidate `ptr1`:
1252+
/// // Notably, the write to `ptr2` did *not* invalidate `ptr1`
1253+
/// // because it mutated a different element:
12531254
/// let _ = ptr1.read();
12541255
/// }
12551256
/// ```

0 commit comments

Comments
 (0)