@@ -26,8 +26,8 @@ use core::pin::{Pin, PinCoerceUnsized};
26
26
use core:: ptr:: { self , NonNull } ;
27
27
#[ cfg( not( no_global_oom_handling) ) ]
28
28
use core:: slice:: from_raw_parts_mut;
29
- use core:: sync:: atomic;
30
29
use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release } ;
30
+ use core:: sync:: atomic:: { self , Atomic } ;
31
31
use core:: { borrow, fmt, hint} ;
32
32
33
33
#[ cfg( not( no_global_oom_handling) ) ]
@@ -369,12 +369,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
369
369
// inner types.
370
370
#[ repr( C ) ]
371
371
struct ArcInner < T : ?Sized > {
372
- strong : atomic :: AtomicUsize ,
372
+ strong : Atomic < usize > ,
373
373
374
374
// the value usize::MAX acts as a sentinel for temporarily "locking" the
375
375
// ability to upgrade weak pointers or downgrade strong ones; this is used
376
376
// to avoid races in `make_mut` and `get_mut`.
377
- weak : atomic :: AtomicUsize ,
377
+ weak : Atomic < usize > ,
378
378
379
379
data : T ,
380
380
}
@@ -2760,8 +2760,8 @@ impl<T, A: Allocator> Weak<T, A> {
2760
2760
/// Helper type to allow accessing the reference counts without
2761
2761
/// making any assertions about the data field.
2762
2762
struct WeakInner < ' a > {
2763
- weak : & ' a atomic :: AtomicUsize ,
2764
- strong : & ' a atomic :: AtomicUsize ,
2763
+ weak : & ' a Atomic < usize > ,
2764
+ strong : & ' a Atomic < usize > ,
2765
2765
}
2766
2766
2767
2767
impl < T : ?Sized > Weak < T > {
0 commit comments