File tree 2 files changed +8
-6
lines changed
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> {
573
573
/// Constructs an `Rc` from a raw pointer.
574
574
///
575
575
/// 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` .
577
577
///
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.
580
581
///
581
582
/// [into_raw]: struct.Rc.html#method.into_raw
582
583
///
Original file line number Diff line number Diff line change @@ -553,10 +553,11 @@ impl<T: ?Sized> Arc<T> {
553
553
/// Constructs an `Arc` from a raw pointer.
554
554
///
555
555
/// 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` .
557
557
///
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.
560
561
///
561
562
/// [into_raw]: struct.Arc.html#method.into_raw
562
563
///
You can’t perform that action at this time.
0 commit comments