File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -573,10 +573,11 @@ impl<T: ?Sized> Rc<T> {
573573 /// Constructs an `Rc` from a raw pointer.
574574 ///
575575 /// The raw pointer must have been previously returned by a call to a
576- /// [`Rc::into_raw`][into_raw].
576+ /// [`Rc::into_raw`][into_raw] using the same `T` .
577577 ///
578- /// This function is unsafe because improper use may lead to memory problems. For example, a
579- /// double-free may occur if the function is called twice on the same raw pointer.
578+ /// This function is unsafe because improper use may lead to memory unsafety,
579+ /// even if `T` is never accessed. For example, a double-free may occur if the function is
580+ /// called twice on the same raw pointer.
580581 ///
581582 /// [into_raw]: struct.Rc.html#method.into_raw
582583 ///
Original file line number Diff line number Diff line change @@ -553,10 +553,11 @@ impl<T: ?Sized> Arc<T> {
553553 /// Constructs an `Arc` from a raw pointer.
554554 ///
555555 /// The raw pointer must have been previously returned by a call to a
556- /// [`Arc::into_raw`][into_raw].
556+ /// [`Arc::into_raw`][into_raw], using the same `T` .
557557 ///
558- /// This function is unsafe because improper use may lead to memory problems. For example, a
559- /// double-free may occur if the function is called twice on the same raw pointer.
558+ /// This function is unsafe because improper use may lead to memory unsafety,
559+ /// even if `T` is never accessed. For example, a double-free may occur if the function is
560+ /// called twice on the same raw pointer.
560561 ///
561562 /// [into_raw]: struct.Arc.html#method.into_raw
562563 ///
You can’t perform that action at this time.
0 commit comments