diff options
Diffstat (limited to 'src/libstd/thread_local/mod.rs')
| -rw-r--r-- | src/libstd/thread_local/mod.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs index 14dd2a1ac9b..9d4e7936de2 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -37,7 +37,7 @@ #![macro_escape] #![experimental] -use prelude::*; +use prelude::v1::*; use cell::UnsafeCell; @@ -248,7 +248,7 @@ impl<T: 'static> Key<T> { #[cfg(any(target_os = "macos", target_os = "linux"))] mod imp { - use prelude::*; + use prelude::v1::*; use cell::UnsafeCell; use intrinsics; @@ -380,7 +380,7 @@ mod imp { #[cfg(not(any(target_os = "macos", target_os = "linux")))] mod imp { - use prelude::*; + use prelude::v1::*; use cell::UnsafeCell; use mem; @@ -453,8 +453,9 @@ mod imp { #[cfg(test)] mod tests { - use prelude::*; + use prelude::v1::*; + use comm::{channel, Sender}; use cell::UnsafeCell; use thread::Thread; @@ -476,7 +477,7 @@ mod tests { *f.get() = 2; }); let (tx, rx) = channel(); - spawn(move|| { + let _t = Thread::spawn(move|| { FOO.with(|f| unsafe { assert_eq!(*f.get(), 1); }); @@ -496,7 +497,7 @@ mod tests { }); let (tx, rx) = channel(); - spawn(move|| unsafe { + let _t = Thread::spawn(move|| unsafe { let mut tx = Some(tx); FOO.with(|f| { *f.get() = Some(Foo(tx.take().unwrap())); @@ -546,7 +547,7 @@ mod tests { Thread::spawn(move|| { drop(S1); - }).join(); + }).join().ok().unwrap(); } #[test] @@ -564,7 +565,7 @@ mod tests { Thread::spawn(move|| unsafe { K1.with(|s| *s.get() = Some(S1)); - }).join(); + }).join().ok().unwrap(); } #[test] @@ -589,7 +590,7 @@ mod tests { } let (tx, rx) = channel(); - spawn(move|| unsafe { + let _t = Thread::spawn(move|| unsafe { let mut tx = Some(tx); K1.with(|s| *s.get() = Some(S1(tx.take().unwrap()))); }); @@ -599,7 +600,7 @@ mod tests { #[cfg(test)] mod dynamic_tests { - use prelude::*; + use prelude::v1::*; use cell::RefCell; use collections::HashMap; |
