@@ -24,8 +24,8 @@ use core::pin::{Pin, PinCoerceUnsized};
24
24
use core:: ptr:: { self , NonNull } ;
25
25
#[ cfg( not( no_global_oom_handling) ) ]
26
26
use core:: slice:: from_raw_parts_mut;
27
- use core:: sync:: atomic;
28
27
use core:: sync:: atomic:: Ordering :: { Acquire , Relaxed , Release } ;
28
+ use core:: sync:: atomic:: { self , Atomic } ;
29
29
use core:: { borrow, fmt, hint} ;
30
30
31
31
#[ cfg( not( no_global_oom_handling) ) ]
@@ -346,12 +346,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
346
346
// inner types.
347
347
#[ repr( C ) ]
348
348
struct ArcInner < T : ?Sized > {
349
- strong : atomic :: AtomicUsize ,
349
+ strong : Atomic < usize > ,
350
350
351
351
// the value usize::MAX acts as a sentinel for temporarily "locking" the
352
352
// ability to upgrade weak pointers or downgrade strong ones; this is used
353
353
// to avoid races in `make_mut` and `get_mut`.
354
- weak : atomic :: AtomicUsize ,
354
+ weak : Atomic < usize > ,
355
355
356
356
data : T ,
357
357
}
@@ -2706,8 +2706,8 @@ impl<T, A: Allocator> Weak<T, A> {
2706
2706
/// Helper type to allow accessing the reference counts without
2707
2707
/// making any assertions about the data field.
2708
2708
struct WeakInner < ' a > {
2709
- weak : & ' a atomic :: AtomicUsize ,
2710
- strong : & ' a atomic :: AtomicUsize ,
2709
+ weak : & ' a Atomic < usize > ,
2710
+ strong : & ' a Atomic < usize > ,
2711
2711
}
2712
2712
2713
2713
impl < T : ?Sized > Weak < T > {
0 commit comments