File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -120,9 +120,9 @@ impl<T> Drop for ArcDestruct<T>{
120120 fn finalize ( & self ) {
121121 unsafe {
122122 do task:: unkillable {
123- let data : ~ArcData <T > = cast:: reinterpret_cast ( & self . data ) ;
123+ let mut data : ~ArcData <T > = cast:: reinterpret_cast ( & self . data ) ;
124124 let new_count =
125- intrinsics:: atomic_xsub ( cast :: transmute_mut ( & data. count ) , 1 ) - 1 ;
125+ intrinsics:: atomic_xsub ( & mut data. count , 1 ) - 1 ;
126126 assert ! ( new_count >= 0 ) ;
127127 if new_count == 0 {
128128 // drop glue takes over.
@@ -185,8 +185,8 @@ pub unsafe fn get_shared_immutable_state<'a,T:Owned>(
185185pub unsafe fn clone_shared_mutable_state < T : Owned > ( rc : & SharedMutableState < T > )
186186 -> SharedMutableState < T > {
187187 unsafe {
188- let ptr: ~ArcData < T > = cast:: reinterpret_cast ( & ( * rc) . data ) ;
189- let new_count = intrinsics:: atomic_xadd ( cast :: transmute_mut ( & ptr. count ) , 1 ) + 1 ;
188+ let mut ptr: ~ArcData < T > = cast:: reinterpret_cast ( & ( * rc) . data ) ;
189+ let new_count = intrinsics:: atomic_xadd ( & mut ptr. count , 1 ) + 1 ;
190190 assert ! ( new_count >= 2 ) ;
191191 cast:: forget ( ptr) ;
192192 }
You can’t perform that action at this time.
0 commit comments