@@ -295,7 +295,7 @@ pub struct Weak<T: ?Sized> {
295295 // This is a `NonNull` to allow optimizing the size of this type in enums,
296296 // but it is not necessarily a valid pointer.
297297 // `Weak::new` sets this to `usize::MAX` so that it doesn’t need
298- // to allocate space on the heap. That's not a value a real pointer
298+ // to allocate space on the heap. That's not a value a real pointer
299299 // will ever have because RcBox has alignment at least 2.
300300 // This is only possible when `T: Sized`; unsized `T` never dangle.
301301 ptr : NonNull < ArcInner < T > > ,
@@ -1656,7 +1656,7 @@ impl<T: ?Sized> Arc<T> {
16561656 //
16571657 // The acquire label here ensures a happens-before relationship with any
16581658 // writes to `strong` (in particular in `Weak::upgrade`) prior to decrements
1659- // of the `weak` count (via `Weak::drop`, which uses release). If the upgraded
1659+ // of the `weak` count (via `Weak::drop`, which uses release). If the upgraded
16601660 // weak ref was never dropped, the CAS here will fail so we do not care to synchronize.
16611661 if self . inner ( ) . weak . compare_exchange ( 1 , usize:: MAX , Acquire , Relaxed ) . is_ok ( ) {
16621662 // This needs to be an `Acquire` to synchronize with the decrement of the `strong`
@@ -1712,7 +1712,7 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
17121712 }
17131713
17141714 // This fence is needed to prevent reordering of use of the data and
1715- // deletion of the data. Because it is marked `Release`, the decreasing
1715+ // deletion of the data. Because it is marked `Release`, the decreasing
17161716 // of the reference count synchronizes with this `Acquire` fence. This
17171717 // means that use of the data happens before decreasing the reference
17181718 // count, which happens before this fence, which happens before the
@@ -2172,7 +2172,7 @@ impl<T: ?Sized> Clone for Weak<T> {
21722172 } else {
21732173 return Weak { ptr : self . ptr } ;
21742174 } ;
2175- // See comments in Arc::clone() for why this is relaxed. This can use a
2175+ // See comments in Arc::clone() for why this is relaxed. This can use a
21762176 // fetch_add (ignoring the lock) because the weak count is only locked
21772177 // where are *no other* weak pointers in existence. (So we can't be
21782178 // running this code in that case).
0 commit comments