Skip to content

Commit 1fdb011

Browse files
committed
---
yaml --- r: 50470 b: refs/heads/auto c: 397a478 h: refs/heads/master v: v3
1 parent dc5de11 commit 1fdb011

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: c16919d3a8e83e4c72668f6ad89d48f6ba8341f6
17+
refs/heads/auto: 397a47852849ac2e286508f2315e695f5d8168cf
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/src/libcore/unstable.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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>(
185185
pub 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
}

0 commit comments

Comments
 (0)