File tree 1 file changed +4
-4
lines changed
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>{
120
120
fn finalize ( & self ) {
121
121
unsafe {
122
122
do task:: unkillable {
123
- let data : ~ArcData <T > = cast:: reinterpret_cast ( & self . data ) ;
123
+ let mut data : ~ArcData <T > = cast:: reinterpret_cast ( & self . data ) ;
124
124
let new_count =
125
- intrinsics:: atomic_xsub ( cast :: transmute_mut ( & data. count ) , 1 ) - 1 ;
125
+ intrinsics:: atomic_xsub ( & mut data. count , 1 ) - 1 ;
126
126
assert ! ( new_count >= 0 ) ;
127
127
if new_count == 0 {
128
128
// drop glue takes over.
@@ -185,8 +185,8 @@ pub unsafe fn get_shared_immutable_state<'a,T:Owned>(
185
185
pub unsafe fn clone_shared_mutable_state < T : Owned > ( rc : & SharedMutableState < T > )
186
186
-> SharedMutableState < T > {
187
187
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 ;
190
190
assert ! ( new_count >= 2 ) ;
191
191
cast:: forget ( ptr) ;
192
192
}
You can’t perform that action at this time.
0 commit comments