about summary refs log tree commit diff
path: root/src/libstd/thread_local
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/thread_local')
-rw-r--r--src/libstd/thread_local/mod.rs21
-rw-r--r--src/libstd/thread_local/scoped.rs4
2 files changed, 13 insertions, 12 deletions
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
index 242dceb4256..674cb5a9805 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;
 
@@ -258,7 +258,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;
@@ -396,7 +396,7 @@ mod imp {
 
 #[cfg(not(any(target_os = "macos", target_os = "linux")))]
 mod imp {
-    use prelude::*;
+    use prelude::v1::*;
 
     use cell::UnsafeCell;
     use mem;
@@ -469,8 +469,9 @@ mod imp {
 
 #[cfg(test)]
 mod tests {
-    use prelude::*;
+    use prelude::v1::*;
 
+    use comm::{channel, Sender};
     use cell::UnsafeCell;
     use thread::Thread;
 
@@ -492,7 +493,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);
             });
@@ -512,7 +513,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()));
@@ -562,7 +563,7 @@ mod tests {
 
         Thread::spawn(move|| {
             drop(S1);
-        }).join();
+        }).join().ok().unwrap();
     }
 
     #[test]
@@ -580,7 +581,7 @@ mod tests {
 
         Thread::spawn(move|| unsafe {
             K1.with(|s| *s.get() = Some(S1));
-        }).join();
+        }).join().ok().unwrap();
     }
 
     #[test]
@@ -605,7 +606,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())));
         });
@@ -615,7 +616,7 @@ mod tests {
 
 #[cfg(test)]
 mod dynamic_tests {
-    use prelude::*;
+    use prelude::v1::*;
 
     use cell::RefCell;
     use collections::HashMap;
diff --git a/src/libstd/thread_local/scoped.rs b/src/libstd/thread_local/scoped.rs
index 756c86c2115..a06048aa706 100644
--- a/src/libstd/thread_local/scoped.rs
+++ b/src/libstd/thread_local/scoped.rs
@@ -40,7 +40,7 @@
 
 #![macro_escape]
 
-use prelude::*;
+use prelude::v1::*;
 
 // macro hygiene sure would be nice, wouldn't it?
 #[doc(hidden)] pub use self::imp::KeyInner;
@@ -238,7 +238,7 @@ mod imp {
 #[cfg(test)]
 mod tests {
     use cell::Cell;
-    use prelude::*;
+    use prelude::v1::*;
 
     #[test]
     fn smoke() {