Skip to content

Commit 8ec8639

Browse files
committed
expand
1 parent 7fcdb93 commit 8ec8639

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcore/ptr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,8 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
28782878
/// Notice that `NonNull<T>` has a `From` instance for `&T`. However, this does
28792879
/// not change the fact that mutating through a (pointer derived from a) shared
28802880
/// reference is undefined behavior unless the mutation happens inside an
2881-
/// [`UnsafeCell<T>`]. When using this `From` instance without an `UnsafeCell<T>`,
2881+
/// [`UnsafeCell<T>`]. The same goes for creating a mutable reference from a shared
2882+
/// reference. When using this `From` instance without an `UnsafeCell<T>`,
28822883
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
28832884
/// is never used for mutation.
28842885
///

0 commit comments

Comments
 (0)