We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fcdb93 commit 8ec8639Copy full SHA for 8ec8639
src/libcore/ptr.rs
@@ -2878,7 +2878,8 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
2878
/// Notice that `NonNull<T>` has a `From` instance for `&T`. However, this does
2879
/// not change the fact that mutating through a (pointer derived from a) shared
2880
/// reference is undefined behavior unless the mutation happens inside an
2881
-/// [`UnsafeCell<T>`]. When using this `From` instance without an `UnsafeCell<T>`,
+/// [`UnsafeCell<T>`]. The same goes for creating a mutable reference from a shared
2882
+/// reference. When using this `From` instance without an `UnsafeCell<T>`,
2883
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
2884
/// is never used for mutation.
2885
///
0 commit comments