about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-03-12 13:44:09 +0100
committerRalf Jung <post@ralfj.de>2019-03-12 13:44:09 +0100
commit8ec8639bf3f8c7b17d91028f698abc3067cd56ea (patch)
tree1c1ff846a7723719268c591a4d9c6789f08730ed
parent7fcdb93cf55ad7ddfd07f5265b363379ae16b3b6 (diff)
downloadrust-8ec8639bf3f8c7b17d91028f698abc3067cd56ea.tar.gz
rust-8ec8639bf3f8c7b17d91028f698abc3067cd56ea.zip
expand
-rw-r--r--src/libcore/ptr.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index a3cf8b63483..19648fe76cf 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -2878,7 +2878,8 @@ impl<'a, T: ?Sized> From<NonNull<T>> for Unique<T> {
 /// Notice that `NonNull<T>` has a `From` instance for `&T`. However, this does
 /// not change the fact that mutating through a (pointer derived from a) shared
 /// reference is undefined behavior unless the mutation happens inside an
-/// [`UnsafeCell<T>`]. When using this `From` instance without an `UnsafeCell<T>`,
+/// [`UnsafeCell<T>`]. The same goes for creating a mutable reference from a shared
+/// reference. When using this `From` instance without an `UnsafeCell<T>`,
 /// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
 /// is never used for mutation.
 ///