@@ -26,8 +26,8 @@ use core::pin::{Pin, PinCoerceUnsized};
2626use core:: ptr:: { self , NonNull } ;
2727#[ cfg( not( no_global_oom_handling) ) ]
2828use core:: slice:: from_raw_parts_mut;
29- use core:: sync:: atomic;
3029use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release } ;
30+ use core:: sync:: atomic:: { self , Atomic } ;
3131use core:: { borrow, fmt, hint} ;
3232
3333#[ cfg( not( no_global_oom_handling) ) ]
@@ -369,12 +369,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
369369// inner types.
370370#[ repr( C ) ]
371371struct ArcInner < T : ?Sized > {
372- strong : atomic :: AtomicUsize ,
372+ strong : Atomic < usize > ,
373373
374374 // the value usize::MAX acts as a sentinel for temporarily "locking" the
375375 // ability to upgrade weak pointers or downgrade strong ones; this is used
376376 // to avoid races in `make_mut` and `get_mut`.
377- weak : atomic :: AtomicUsize ,
377+ weak : Atomic < usize > ,
378378
379379 data : T ,
380380}
@@ -2760,8 +2760,8 @@ impl<T, A: Allocator> Weak<T, A> {
27602760/// Helper type to allow accessing the reference counts without
27612761/// making any assertions about the data field.
27622762struct WeakInner < ' a > {
2763- weak : & ' a atomic :: AtomicUsize ,
2764- strong : & ' a atomic :: AtomicUsize ,
2763+ weak : & ' a Atomic < usize > ,
2764+ strong : & ' a Atomic < usize > ,
27652765}
27662766
27672767impl < T : ?Sized > Weak < T > {
0 commit comments