@@ -295,7 +295,7 @@ pub struct Weak<T: ?Sized> {
295
295
// This is a `NonNull` to allow optimizing the size of this type in enums,
296
296
// but it is not necessarily a valid pointer.
297
297
// `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
299
299
// will ever have because RcBox has alignment at least 2.
300
300
// This is only possible when `T: Sized`; unsized `T` never dangle.
301
301
ptr : NonNull < ArcInner < T > > ,
@@ -1656,7 +1656,7 @@ impl<T: ?Sized> Arc<T> {
1656
1656
//
1657
1657
// The acquire label here ensures a happens-before relationship with any
1658
1658
// 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
1660
1660
// weak ref was never dropped, the CAS here will fail so we do not care to synchronize.
1661
1661
if self . inner ( ) . weak . compare_exchange ( 1 , usize:: MAX , Acquire , Relaxed ) . is_ok ( ) {
1662
1662
// 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> {
1712
1712
}
1713
1713
1714
1714
// 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
1716
1716
// of the reference count synchronizes with this `Acquire` fence. This
1717
1717
// means that use of the data happens before decreasing the reference
1718
1718
// count, which happens before this fence, which happens before the
@@ -2172,7 +2172,7 @@ impl<T: ?Sized> Clone for Weak<T> {
2172
2172
} else {
2173
2173
return Weak { ptr : self . ptr } ;
2174
2174
} ;
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
2176
2176
// fetch_add (ignoring the lock) because the weak count is only locked
2177
2177
// where are *no other* weak pointers in existence. (So we can't be
2178
2178
// running this code in that case).
0 commit comments