@@ -1685,7 +1685,7 @@ impl<T: ?Sized> Weak<T> {
16851685 // a valid pointer, so that `from_raw` can reverse this transformation.
16861686 ( ptr as * mut T ) . set_ptr_value ( ptr:: null_mut ( ) )
16871687 } 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.
16891689 // The payload may be dropped at this point, and we have to maintain provenance,
16901690 // so use raw pointer manipulation.
16911691 unsafe { & raw mut ( * ptr) . data }
@@ -1777,8 +1777,8 @@ impl<T: ?Sized> Weak<T> {
17771777 // SAFETY: this is the same sentinel as used in Weak::new and is_dangling
17781778 ( ptr as * mut ArcInner < T > ) . set_ptr_value ( usize:: MAX as * mut _ )
17791779 } 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 .
17821782 let offset = unsafe { data_offset ( ptr) } ;
17831783 // Thus, we reverse the offset to get the whole RcBox.
17841784 // SAFETY: the pointer originated from a Weak, so this offset is safe.
@@ -2471,8 +2471,7 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
24712471#[ stable( feature = "pin" , since = "1.33.0" ) ]
24722472impl < T : ?Sized > Unpin for Arc < T > { }
24732473
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.
24762475///
24772476/// # Safety
24782477///
0 commit comments