about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-02 09:24:56 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-02 10:50:13 -0800
commite921e3f04513ffb094208a538a2835d4dc77b991 (patch)
tree0fc18976815572ac2f9cab2e01236243e684eb4d /src/libstd
parent1f2ead1629ce544d98f35225061d216abd86d5a6 (diff)
downloadrust-e921e3f04513ffb094208a538a2835d4dc77b991.tar.gz
rust-e921e3f04513ffb094208a538a2835d4dc77b991.zip
Rollup test fixes and rebase conflicts
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs2
-rw-r--r--src/libstd/io/timer.rs2
-rw-r--r--src/libstd/path/windows.rs4
-rw-r--r--src/libstd/sync/condvar.rs4
-rw-r--r--src/libstd/sync/mpsc/select.rs1
-rw-r--r--src/libstd/sync/mutex.rs2
-rw-r--r--src/libstd/sys/common/helper_thread.rs1
-rw-r--r--src/libstd/sys/unix/pipe.rs2
-rw-r--r--src/libstd/sys/windows/mod.rs3
-rw-r--r--src/libstd/sys/windows/timer.rs9
-rw-r--r--src/libstd/thread.rs2
11 files changed, 10 insertions, 22 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 813edc3eb53..539fcb23bb0 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1918,7 +1918,7 @@ impl fmt::Show for FilePermission {
 #[cfg(test)]
 mod tests {
     use self::BadReaderBehavior::*;
-    use super::{IoResult, Reader, MemReader, NoProgress, InvalidInput};
+    use super::{IoResult, MemReader, NoProgress, InvalidInput};
     use prelude::v1::*;
     use uint;
 
diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs
index de4270e705b..e073f76af82 100644
--- a/src/libstd/io/timer.rs
+++ b/src/libstd/io/timer.rs
@@ -225,8 +225,6 @@ fn in_ms_u64(d: Duration) -> u64 {
 
 #[cfg(test)]
 mod test {
-    use prelude::v1::*;
-
     use super::Timer;
     use thread::Thread;
     use time::Duration;
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index e047afc8eee..a6d30dc5778 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -1119,10 +1119,6 @@ fn prefix_len(p: Option<PathPrefix>) -> uint {
 
 #[cfg(test)]
 mod tests {
-    use prelude::v1::Option::{mod, Some, None};
-    use prelude::v1::{Vec, Clone, AsSlice, SliceExt, CloneSliceExt, IteratorExt};
-    use prelude::v1::{DoubleEndedIteratorExt, Str, ToString, GenericPath};
-
     use super::PathPrefix::*;
     use super::parse_prefix;
     use super::*;
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 8d40a854aaf..19b8f5e62cf 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -307,7 +307,7 @@ mod tests {
         static C: StaticCondvar = CONDVAR_INIT;
         static M: StaticMutex = MUTEX_INIT;
 
-        let mut g = M.lock().unwrap();
+        let g = M.lock().unwrap();
         let _t = Thread::spawn(move|| {
             let _g = M.lock().unwrap();
             C.notify_one();
@@ -386,6 +386,6 @@ mod tests {
         g = C.wait(g).unwrap();
         drop(g);
 
-        C.wait(M2.lock().unwrap()).unwrap();
+        let _ = C.wait(M2.lock().unwrap()).unwrap();
     }
 }
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index fc1e0b34977..43554d7c335 100644
--- a/src/libstd/sync/mpsc/select.rs
+++ b/src/libstd/sync/mpsc/select.rs
@@ -337,7 +337,6 @@ mod test {
     use prelude::v1::*;
 
     use thread::Thread;
-    use super::*;
     use sync::mpsc::*;
 
     // Don't use the libstd version so we can pull in the right Select structure
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 3f155b02065..270c57f1ec0 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -447,7 +447,7 @@ mod test {
     fn test_mutex_arc_poison() {
         let arc = Arc::new(Mutex::new(1i));
         let arc2 = arc.clone();
-        Thread::spawn(move|| {
+        let _ = Thread::spawn(move|| {
             let lock = arc2.lock().unwrap();
             assert_eq!(*lock, 2);
         }).join();
diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs
index 1ce42aaa175..bdf1bf3dfd0 100644
--- a/src/libstd/sys/common/helper_thread.rs
+++ b/src/libstd/sys/common/helper_thread.rs
@@ -23,7 +23,6 @@
 use prelude::v1::*;
 
 use cell::UnsafeCell;
-use comm::{channel, Sender, Receiver};
 use mem;
 use rt;
 use sync::{StaticMutex, StaticCondvar};
diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs
index 0ab213cd0af..623f3f6a89c 100644
--- a/src/libstd/sys/unix/pipe.rs
+++ b/src/libstd/sys/unix/pipe.rs
@@ -10,8 +10,6 @@
 
 use prelude::v1::*;
 
-use prelude::*;
-
 use libc;
 use c_str::CString;
 use mem;
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs
index d625e63952a..1034f0615d9 100644
--- a/src/libstd/sys/windows/mod.rs
+++ b/src/libstd/sys/windows/mod.rs
@@ -24,13 +24,12 @@ use num;
 use mem;
 use io::{mod, IoResult, IoError};
 use sync::{Once, ONCE_INIT};
-use comm::Sender;
 
 macro_rules! helper_init { (static $name:ident: Helper<$m:ty>) => (
     static $name: Helper<$m> = Helper {
         lock: ::sync::MUTEX_INIT,
         cond: ::sync::CONDVAR_INIT,
-        chan: ::cell::UnsafeCell { value: 0 as *mut Sender<$m> },
+        chan: ::cell::UnsafeCell { value: 0 as *mut ::sync::mpsc::Sender<$m> },
         signal: ::cell::UnsafeCell { value: 0 },
         initialized: ::cell::UnsafeCell { value: false },
         shutdown: ::cell::UnsafeCell { value: false },
diff --git a/src/libstd/sys/windows/timer.rs b/src/libstd/sys/windows/timer.rs
index 485dc251050..343b78543bf 100644
--- a/src/libstd/sys/windows/timer.rs
+++ b/src/libstd/sys/windows/timer.rs
@@ -25,10 +25,9 @@ use prelude::v1::*;
 
 use libc;
 use ptr;
-use comm;
 
-use comm::{channel, Sender, Receiver};
 use io::IoResult;
+use sync::mpsc::{channel, Sender, Receiver, TryRecvError};
 use sys::c;
 use sys::fs::FileDesc;
 use sys_common::helper_thread::Helper;
@@ -72,7 +71,7 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) {
                         chans.push((c, one));
                     }
                     Ok(RemoveTimer(obj, c)) => {
-                        c.send(());
+                        c.send(()).unwrap();
                         match objs.iter().position(|&o| o == obj) {
                             Some(i) => {
                                 drop(objs.remove(i));
@@ -81,7 +80,7 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) {
                             None => {}
                         }
                     }
-                    Err(comm::Disconnected) => {
+                    Err(TryRecvError::Disconnected) => {
                         assert_eq!(objs.len(), 1);
                         assert_eq!(chans.len(), 0);
                         break 'outer;
@@ -133,7 +132,7 @@ impl Timer {
 
         let (tx, rx) = channel();
         HELPER.send(RemoveTimer(self.obj, tx));
-        rx.recv();
+        rx.recv().unwrap();
 
         self.on_worker = false;
     }
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs
index 9a6fcab6a88..3c87309dabc 100644
--- a/src/libstd/thread.rs
+++ b/src/libstd/thread.rs
@@ -443,8 +443,8 @@ mod test {
     use prelude::v1::*;
 
     use any::{Any, AnyRefExt};
-    use boxed::BoxAny;
     use sync::mpsc::{channel, Sender};
+    use boxed::BoxAny;
     use result;
     use std::io::{ChanReader, ChanWriter};
     use super::{Thread, Builder};