about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-19 17:36:04 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-19 17:36:04 -0700
commitd49aef7c024dba42fe9e440c06065235fa8a73f7 (patch)
tree31f3b992ce063a4795db1dc75e1090b972e7816c /src/libstd
parent84378b0b5af9ec09ce627fdd59353b408d7f7fb4 (diff)
downloadrust-d49aef7c024dba42fe9e440c06065235fa8a73f7.tar.gz
rust-d49aef7c024dba42fe9e440c06065235fa8a73f7.zip
std: Build Exclusive on Arc<Unsafe<T>>
This removes the usage of UnsafeArc
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/unstable/sync.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs
index 5be10fc27df..f0f7e40ce09 100644
--- a/src/libstd/unstable/sync.rs
+++ b/src/libstd/unstable/sync.rs
@@ -8,9 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use alloc::arc::Arc;
+
 use clone::Clone;
 use kinds::Send;
-use sync::arc::UnsafeArc;
+use ty::Unsafe;
 use unstable::mutex::NativeMutex;
 
 struct ExData<T> {
@@ -30,7 +32,7 @@ struct ExData<T> {
  * need to block or deschedule while accessing shared state, use extra::sync::RWArc.
  */
 pub struct Exclusive<T> {
-    x: UnsafeArc<ExData<T>>
+    x: Arc<Unsafe<ExData<T>>>
 }
 
 impl<T:Send> Clone for Exclusive<T> {
@@ -48,7 +50,7 @@ impl<T:Send> Exclusive<T> {
             data: user_data
         };
         Exclusive {
-            x: UnsafeArc::new(data)
+            x: Arc::new(Unsafe::new(data))
         }
     }