From d49aef7c024dba42fe9e440c06065235fa8a73f7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 19 May 2014 17:36:04 -0700 Subject: [PATCH] std: Build Exclusive on Arc> This removes the usage of UnsafeArc --- src/libstd/unstable/sync.rs | 8 +++++--- 1 file 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 { @@ -30,7 +32,7 @@ struct ExData { * need to block or deschedule while accessing shared state, use extra::sync::RWArc. */ pub struct Exclusive { - x: UnsafeArc> + x: Arc>> } impl Clone for Exclusive { @@ -48,7 +50,7 @@ impl Exclusive { data: user_data }; Exclusive { - x: UnsafeArc::new(data) + x: Arc::new(Unsafe::new(data)) } }