diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 3080a8bf4596..60a8e1714b64 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -573,10 +573,11 @@ impl Rc { /// Constructs an `Rc` from a raw pointer. /// /// The raw pointer must have been previously returned by a call to a - /// [`Rc::into_raw`][into_raw]. + /// [`Rc::into_raw`][into_raw] using the same `T`. /// - /// This function is unsafe because improper use may lead to memory problems. For example, a - /// double-free may occur if the function is called twice on the same raw pointer. + /// This function is unsafe because improper use may lead to memory unsafety, + /// even if `T` is never accessed. For example, a double-free may occur if the function is + /// called twice on the same raw pointer. /// /// [into_raw]: struct.Rc.html#method.into_raw /// diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index dc53ad284072..024f9407604f 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -553,10 +553,11 @@ impl Arc { /// Constructs an `Arc` from a raw pointer. /// /// The raw pointer must have been previously returned by a call to a - /// [`Arc::into_raw`][into_raw]. + /// [`Arc::into_raw`][into_raw], using the same `T`. /// - /// This function is unsafe because improper use may lead to memory problems. For example, a - /// double-free may occur if the function is called twice on the same raw pointer. + /// This function is unsafe because improper use may lead to memory unsafety, + /// even if `T` is never accessed. For example, a double-free may occur if the function is + /// called twice on the same raw pointer. /// /// [into_raw]: struct.Arc.html#method.into_raw ///