@@ -24,8 +24,8 @@ use core::pin::{Pin, PinCoerceUnsized};
2424use core:: ptr:: { self , NonNull } ;
2525#[ cfg( not( no_global_oom_handling) ) ]
2626use core:: slice:: from_raw_parts_mut;
27- use core:: sync:: atomic;
2827use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release } ;
28+ use core:: sync:: atomic:: { self , Atomic } ;
2929use core:: { borrow, fmt, hint} ;
3030
3131#[ cfg( not( no_global_oom_handling) ) ]
@@ -346,12 +346,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
346346// inner types.
347347#[ repr( C ) ]
348348struct ArcInner < T : ?Sized > {
349- strong : atomic :: AtomicUsize ,
349+ strong : Atomic < usize > ,
350350
351351 // the value usize::MAX acts as a sentinel for temporarily "locking" the
352352 // ability to upgrade weak pointers or downgrade strong ones; this is used
353353 // to avoid races in `make_mut` and `get_mut`.
354- weak : atomic :: AtomicUsize ,
354+ weak : Atomic < usize > ,
355355
356356 data : T ,
357357}
@@ -2706,8 +2706,8 @@ impl<T, A: Allocator> Weak<T, A> {
27062706/// Helper type to allow accessing the reference counts without
27072707/// making any assertions about the data field.
27082708struct WeakInner < ' a > {
2709- weak : & ' a atomic :: AtomicUsize ,
2710- strong : & ' a atomic :: AtomicUsize ,
2709+ weak : & ' a Atomic < usize > ,
2710+ strong : & ' a Atomic < usize > ,
27112711}
27122712
27132713impl < T : ?Sized > Weak < T > {
0 commit comments