@@ -319,7 +319,7 @@ pub struct Weak<
319319 // but it is not necessarily a valid pointer.
320320 // `Weak::new` sets this to `usize::MAX` so that it doesn’t need
321321 // to allocate space on the heap. That's not a value a real pointer
322- // will ever have because RcBox has alignment at least 2.
322+ // will ever have because RcInner has alignment at least 2.
323323 // This is only possible when `T: Sized`; unsized `T` never dangle.
324324 ptr : NonNull < ArcInner < T > > ,
325325 alloc : A ,
@@ -1581,7 +1581,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
15811581 pub fn as_ptr ( this : & Self ) -> * const T {
15821582 let ptr: * mut ArcInner < T > = NonNull :: as_ptr ( this. ptr ) ;
15831583
1584- // SAFETY: This cannot go through Deref::deref or RcBoxPtr ::inner because
1584+ // SAFETY: This cannot go through Deref::deref or RcInnerPtr ::inner because
15851585 // this is required to retain raw/mut provenance such that e.g. `get_mut` can
15861586 // write through the pointer after the Rc is recovered through `from_raw`.
15871587 unsafe { & raw mut ( * ptr) . data }
@@ -2936,7 +2936,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
29362936 // Otherwise, we're guaranteed the pointer came from a nondangling Weak.
29372937 // SAFETY: data_offset is safe to call, as ptr references a real (potentially dropped) T.
29382938 let offset = unsafe { data_offset ( ptr) } ;
2939- // Thus, we reverse the offset to get the whole RcBox .
2939+ // Thus, we reverse the offset to get the whole RcInner .
29402940 // SAFETY: the pointer originated from a Weak, so this offset is safe.
29412941 unsafe { ptr. byte_sub ( offset) as * mut ArcInner < T > }
29422942 } ;
@@ -3861,7 +3861,7 @@ impl<T: ?Sized, A: Allocator> Unpin for Arc<T, A> {}
38613861/// valid instance of T, but the T is allowed to be dropped.
38623862unsafe fn data_offset < T : ?Sized > ( ptr : * const T ) -> usize {
38633863 // Align the unsized value to the end of the ArcInner.
3864- // Because RcBox is repr(C), it will always be the last field in memory.
3864+ // Because RcInner is repr(C), it will always be the last field in memory.
38653865 // SAFETY: since the only unsized types possible are slices, trait objects,
38663866 // and extern types, the input safety requirement is currently enough to
38673867 // satisfy the requirements of align_of_val_raw; this is an implementation
0 commit comments