File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -360,8 +360,8 @@ impl<T> [T] {
360360 /// function returns, or else it will end up pointing to garbage.
361361 ///
362362 /// The caller must also ensure that the memory the pointer (non-transitively) points to
363- /// is never written to (except inside an `UnsafeCell`). If you need to mutate
364- /// the contents of the slice, use [`as_mut_ptr`].
363+ /// is never written to (except inside an `UnsafeCell`) using this pointer or any pointer
364+ /// derived from it. If you need to mutate the contents of the slice, use [`as_mut_ptr`].
365365 ///
366366 /// Modifying the container referenced by this slice may cause its buffer
367367 /// to be reallocated, which would also make any pointers to it invalid.
Original file line number Diff line number Diff line change @@ -2188,9 +2188,8 @@ impl str {
21882188 /// [`u8`]. This pointer will be pointing to the first byte of the string
21892189 /// slice.
21902190 ///
2191- /// The caller must ensure that the memory the pointer points to
2192- /// is never written to. If you need to mutate
2193- /// the contents of the string slice, use [`as_mut_ptr`].
2191+ /// The caller must ensure that the returned pointer is never written to.
2192+ /// If you need to mutate the contents of the string slice, use [`as_mut_ptr`].
21942193 ///
21952194 /// [`u8`]: primitive.u8.html
21962195 /// [`as_mut_ptr`]: #method.as_mut_ptr
You can’t perform that action at this time.
0 commit comments