@@ -137,8 +137,8 @@ unsafe impl<T: Sync + Send> Send for Weak<T> { }
137137unsafe impl < T : Sync + Send > Sync for Weak < T > { }
138138
139139struct ArcInner < T > {
140- strong : atomic:: AtomicUint ,
141- weak : atomic:: AtomicUint ,
140+ strong : atomic:: AtomicUsize ,
141+ weak : atomic:: AtomicUsize ,
142142 data : T ,
143143}
144144
@@ -161,8 +161,8 @@ impl<T> Arc<T> {
161161 // Start the weak pointer count as 1 which is the weak pointer that's
162162 // held by all the strong pointers (kinda), see std/rc.rs for more info
163163 let x = box ArcInner {
164- strong : atomic:: AtomicUint :: new ( 1 ) ,
165- weak : atomic:: AtomicUint :: new ( 1 ) ,
164+ strong : atomic:: AtomicUsize :: new ( 1 ) ,
165+ weak : atomic:: AtomicUsize :: new ( 1 ) ,
166166 data : data,
167167 } ;
168168 Arc { _ptr : unsafe { NonZero :: new ( mem:: transmute ( x) ) } }
@@ -619,7 +619,7 @@ mod tests {
619619 use super :: { Arc , Weak , weak_count, strong_count} ;
620620 use std:: sync:: Mutex ;
621621
622- struct Canary ( * mut atomic:: AtomicUint ) ;
622+ struct Canary ( * mut atomic:: AtomicUsize ) ;
623623
624624 impl Drop for Canary
625625 {
@@ -743,16 +743,16 @@ mod tests {
743743
744744 #[ test]
745745 fn drop_arc ( ) {
746- let mut canary = atomic:: AtomicUint :: new ( 0 ) ;
747- let x = Arc :: new ( Canary ( & mut canary as * mut atomic:: AtomicUint ) ) ;
746+ let mut canary = atomic:: AtomicUsize :: new ( 0 ) ;
747+ let x = Arc :: new ( Canary ( & mut canary as * mut atomic:: AtomicUsize ) ) ;
748748 drop ( x) ;
749749 assert ! ( canary. load( Acquire ) == 1 ) ;
750750 }
751751
752752 #[ test]
753753 fn drop_arc_weak ( ) {
754- let mut canary = atomic:: AtomicUint :: new ( 0 ) ;
755- let arc = Arc :: new ( Canary ( & mut canary as * mut atomic:: AtomicUint ) ) ;
754+ let mut canary = atomic:: AtomicUsize :: new ( 0 ) ;
755+ let arc = Arc :: new ( Canary ( & mut canary as * mut atomic:: AtomicUsize ) ) ;
756756 let arc_weak = arc. downgrade ( ) ;
757757 assert ! ( canary. load( Acquire ) == 0 ) ;
758758 drop ( arc) ;
0 commit comments