@@ -25,8 +25,8 @@ use core::pin::{Pin, PinCoerceUnsized};
2525use core:: ptr:: { self , NonNull } ;
2626#[ cfg( not( no_global_oom_handling) ) ]
2727use core:: slice:: from_raw_parts_mut;
28- use core:: sync:: atomic;
2928use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release } ;
29+ use core:: sync:: atomic:: { self , Atomic } ;
3030use core:: { borrow, fmt, hint} ;
3131
3232#[ cfg( not( no_global_oom_handling) ) ]
@@ -348,12 +348,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
348348// inner types.
349349#[ repr( C ) ]
350350struct ArcInner < T : ?Sized > {
351- strong : atomic :: AtomicUsize ,
351+ strong : Atomic < usize > ,
352352
353353 // the value usize::MAX acts as a sentinel for temporarily "locking" the
354354 // ability to upgrade weak pointers or downgrade strong ones; this is used
355355 // to avoid races in `make_mut` and `get_mut`.
356- weak : atomic :: AtomicUsize ,
356+ weak : Atomic < usize > ,
357357
358358 data : T ,
359359}
@@ -2724,8 +2724,8 @@ impl<T, A: Allocator> Weak<T, A> {
27242724/// Helper type to allow accessing the reference counts without
27252725/// making any assertions about the data field.
27262726struct WeakInner < ' a > {
2727- weak : & ' a atomic :: AtomicUsize ,
2728- strong : & ' a atomic :: AtomicUsize ,
2727+ weak : & ' a Atomic < usize > ,
2728+ strong : & ' a Atomic < usize > ,
27292729}
27302730
27312731impl < T : ?Sized > Weak < T > {
0 commit comments