File tree 2 files changed +4
-5
lines changed
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -360,8 +360,8 @@ impl<T> [T] {
360
360
/// function returns, or else it will end up pointing to garbage.
361
361
///
362
362
/// 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`].
365
365
///
366
366
/// Modifying the container referenced by this slice may cause its buffer
367
367
/// 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 {
2188
2188
/// [`u8`]. This pointer will be pointing to the first byte of the string
2189
2189
/// slice.
2190
2190
///
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`].
2194
2193
///
2195
2194
/// [`u8`]: primitive.u8.html
2196
2195
/// [`as_mut_ptr`]: #method.as_mut_ptr
You can’t perform that action at this time.
0 commit comments