about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/arc.rs2
-rw-r--r--src/libsync/raw.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsync/arc.rs b/src/libsync/arc.rs
index ecfeade2fb4..b5c66075952 100644
--- a/src/libsync/arc.rs
+++ b/src/libsync/arc.rs
@@ -70,7 +70,7 @@ impl<T: Share + Send> Arc<T> {
     pub fn new(data: T) -> Arc<T> {
         // Start the weak pointer count as 1 which is the weak pointer that's
         // held by all the strong pointers (kinda), see std/rc.rs for more info
-        let x = ~ArcInner {
+        let x = box ArcInner {
             strong: atomics::AtomicUint::new(1),
             weak: atomics::AtomicUint::new(1),
             data: data,
diff --git a/src/libsync/raw.rs b/src/libsync/raw.rs
index eb90797395e..6ab833a19ef 100644
--- a/src/libsync/raw.rs
+++ b/src/libsync/raw.rs
@@ -109,7 +109,7 @@ struct SemGuard<'a, Q> {
 impl<Q: Send> Sem<Q> {
     fn new(count: int, q: Q) -> Sem<Q> {
         let inner = unsafe {
-            cast::transmute(~SemInner {
+            cast::transmute(box SemInner {
                 waiters: WaitQueue::new(),
                 count: count,
                 blocked: q,
@@ -726,7 +726,7 @@ mod tests {
         let (tx, rx) = channel();
         let m = Arc::new(Mutex::new());
         let m2 = m.clone();
-        let mut sharedstate = ~0;
+        let mut sharedstate = box 0;
         {
             let ptr: *mut int = &mut *sharedstate;
             task::spawn(proc() {
@@ -895,7 +895,7 @@ mod tests {
         // mutex mutual exclusion test, a ways above.
         let (tx, rx) = channel();
         let x2 = x.clone();
-        let mut sharedstate = ~0;
+        let mut sharedstate = box 0;
         {
             let ptr: *int = &*sharedstate;
             task::spawn(proc() {