Skip to content

Commit d49aef7

Browse files
committed
std: Build Exclusive on Arc<Unsafe<T>>
This removes the usage of UnsafeArc
1 parent 84378b0 commit d49aef7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/libstd/unstable/sync.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use alloc::arc::Arc;
12+
1113
use clone::Clone;
1214
use kinds::Send;
13-
use sync::arc::UnsafeArc;
15+
use ty::Unsafe;
1416
use unstable::mutex::NativeMutex;
1517

1618
struct ExData<T> {
@@ -30,7 +32,7 @@ struct ExData<T> {
3032
* need to block or deschedule while accessing shared state, use extra::sync::RWArc.
3133
*/
3234
pub struct Exclusive<T> {
33-
x: UnsafeArc<ExData<T>>
35+
x: Arc<Unsafe<ExData<T>>>
3436
}
3537

3638
impl<T:Send> Clone for Exclusive<T> {
@@ -48,7 +50,7 @@ impl<T:Send> Exclusive<T> {
4850
data: user_data
4951
};
5052
Exclusive {
51-
x: UnsafeArc::new(data)
53+
x: Arc::new(Unsafe::new(data))
5254
}
5355
}
5456

0 commit comments

Comments
 (0)