Skip to content

Commit 787360e

Browse files
committed
---
yaml --- r: 71749 b: refs/heads/dist-snap c: 397a478 h: refs/heads/master i: 71747: 3a48fc2 v: v3
1 parent e26d733 commit 787360e

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: c16919d3a8e83e4c72668f6ad89d48f6ba8341f6
10+
refs/heads/dist-snap: 397a47852849ac2e286508f2315e695f5d8168cf
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)