@@ -1685,7 +1685,7 @@ impl<T: ?Sized> Weak<T> {
1685
1685
// a valid pointer, so that `from_raw` can reverse this transformation.
1686
1686
( ptr as * mut T ) . set_ptr_value ( ptr:: null_mut ( ) )
1687
1687
} else {
1688
- // SAFETY: If the pointer is not dangling, it describes to a valid allocation.
1688
+ // SAFETY: If the pointer is not dangling, it references a valid allocation.
1689
1689
// The payload may be dropped at this point, and we have to maintain provenance,
1690
1690
// so use raw pointer manipulation.
1691
1691
unsafe { & raw mut ( * ptr) . data }
@@ -1777,8 +1777,8 @@ impl<T: ?Sized> Weak<T> {
1777
1777
// SAFETY: this is the same sentinel as used in Weak::new and is_dangling
1778
1778
( ptr as * mut ArcInner < T > ) . set_ptr_value ( usize:: MAX as * mut _ )
1779
1779
} else {
1780
- // Otherwise, this describes a real allocation.
1781
- // SAFETY: data_offset is safe to call, as ptr describes a real allocation .
1780
+ // Otherwise, this references a real allocation.
1781
+ // SAFETY: data_offset is safe to call, as ptr references a real (potentially dropped) T .
1782
1782
let offset = unsafe { data_offset ( ptr) } ;
1783
1783
// Thus, we reverse the offset to get the whole RcBox.
1784
1784
// SAFETY: the pointer originated from a Weak, so this offset is safe.
@@ -2471,8 +2471,7 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
2471
2471
#[ stable( feature = "pin" , since = "1.33.0" ) ]
2472
2472
impl < T : ?Sized > Unpin for Arc < T > { }
2473
2473
2474
- /// Get the offset within an `ArcInner` for
2475
- /// a payload of type described by a pointer.
2474
+ /// Get the offset within an `ArcInner` for the payload behind a pointer.
2476
2475
///
2477
2476
/// # Safety
2478
2477
///
0 commit comments