File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1091,10 +1091,11 @@ impl<T: ?Sized> Rc<T> {
10911091 ///
10921092 /// # Safety
10931093 ///
1094- /// Any other `Rc` or [`Weak`] pointers to the same allocation must not be dereferenced
1095- /// for the duration of the returned borrow.
1096- /// This is trivially the case if no such pointers exist,
1097- /// for example immediately after `Rc::new`.
1094+ /// If any other `Rc` or [`Weak`] pointers to the same allocation exist, then
1095+ /// they must be must not be dereferenced or have active borrows for the duration
1096+ /// of the returned borrow, and their inner type must be exactly the same as the
1097+ /// inner type of this Rc (including lifetimes). This is trivially the case if no
1098+ /// such pointers exist, for example immediately after `Rc::new`.
10981099 ///
10991100 /// # Examples
11001101 ///
Original file line number Diff line number Diff line change @@ -1630,10 +1630,11 @@ impl<T: ?Sized> Arc<T> {
16301630 ///
16311631 /// # Safety
16321632 ///
1633- /// Any other `Arc` or [`Weak`] pointers to the same allocation must not be dereferenced
1634- /// for the duration of the returned borrow.
1635- /// This is trivially the case if no such pointers exist,
1636- /// for example immediately after `Arc::new`.
1633+ /// If any other `Arc` or [`Weak`] pointers to the same allocation exist, then
1634+ /// they must be must not be dereferenced or have active borrows for the duration
1635+ /// of the returned borrow, and their inner type must be exactly the same as the
1636+ /// inner type of this Rc (including lifetimes). This is trivially the case if no
1637+ /// such pointers exist, for example immediately after `Arc::new`.
16371638 ///
16381639 /// # Examples
16391640 ///
You can’t perform that action at this time.
0 commit comments