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