about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/reference.md1
-rw-r--r--src/liballoc/boxed.rs23
-rw-r--r--src/libcollections/bit.rs2
-rw-r--r--src/libcore/option.rs2
-rw-r--r--src/libcore/result.rs1
-rw-r--r--src/librustc_trans/back/write.rs1
-rw-r--r--src/libserialize/json.rs2
-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
-rw-r--r--src/test/bench/msgsend-pipes-shared.rs15
-rw-r--r--src/test/bench/msgsend-pipes.rs11
-rw-r--r--src/test/bench/rt-messaging-ping-pong.rs2
-rw-r--r--src/test/bench/rt-parfib.rs7
-rw-r--r--src/test/bench/shootout-binarytrees.rs2
-rw-r--r--src/test/bench/shootout-chameneos-redux.rs14
-rw-r--r--src/test/bench/shootout-fannkuch-redux.rs2
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs6
-rw-r--r--src/test/bench/shootout-meteor.rs6
-rw-r--r--src/test/bench/shootout-pfib.rs10
-rw-r--r--src/test/bench/shootout-threadring.rs2
-rw-r--r--src/test/bench/task-perf-jargon-metal-smoke.rs8
-rw-r--r--src/test/compile-fail/issue-19883.rs2
31 files changed, 56 insertions, 95 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index ec44dc20386..a8abb595034 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -3177,7 +3177,6 @@ then the expression completes.
 Some examples of call expressions:
 
 ```
-# use std::str::from_str;
 # fn add(x: int, y: int) -> int { 0 }
 
 let x: int = add(1, 2);
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 41541619945..5f8789bf1c7 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -113,28 +113,9 @@ impl<S: hash::Writer, Sized? T: Hash<S>> Hash<S> for Box<T> {
     }
 }
 
-#[cfg(not(stage0))]
-impl Box<Any> {
-    pub fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
-        if self.is::<T>() {
-            unsafe {
-                // Get the raw representation of the trait object
-                let to: TraitObject =
-                    mem::transmute::<Box<Any>, TraitObject>(self);
-
-                // Extract the data pointer
-                Ok(mem::transmute(to.data))
-            }
-        } else {
-            Err(self)
-        }
-    }
-}
-
 /// Extension methods for an owning `Any` trait object.
 #[unstable = "post-DST and coherence changes, this will not be a trait but \
               rather a direct `impl` on `Box<Any>`"]
-#[cfg(stage0)]
 pub trait BoxAny {
     /// Returns the boxed value if it is of type `T`, or
     /// `Err(Self)` if it isn't.
@@ -142,10 +123,10 @@ pub trait BoxAny {
     fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
 }
 
-#[stable]
-#[cfg(stage0)]
 impl BoxAny for Box<Any> {
     #[inline]
+    #[unstable = "method may be renamed with respect to other downcasting \
+                  methods"]
     fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
         if self.is::<T>() {
             unsafe {
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index 91dea72ec8d..6ea624df034 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -92,7 +92,7 @@ use core::iter::{Chain, Enumerate, Repeat, Skip, Take, repeat, Cloned};
 use core::iter::{mod, FromIterator};
 use core::num::Int;
 use core::ops::Index;
-use core::slice::{Iter, IterMut};
+use core::slice;
 use core::{u8, u32, uint};
 use bitv_set; //so meta
 
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index ac0a6a78bae..d831a57893b 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -723,8 +723,6 @@ impl<T: Default> Option<T> {
     /// `None` on error.
     ///
     /// ```
-    /// use std::str::from_str;
-    ///
     /// let good_year_from_input = "1909";
     /// let bad_year_from_input = "190blarg";
     /// let good_year = good_year_from_input.parse().unwrap_or_default();
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 3ebe191930b..bd1c6dbcf1e 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -449,7 +449,6 @@ impl<T, E> Result<T, E> {
     ///
     /// ```
     /// use std::io::IoResult;
-    /// use std::str::from_str;
     ///
     /// let mut buffer = &mut b"1\n2\n3\n4\n";
     ///
diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs
index cb1954f3ff7..5cd62675c1d 100644
--- a/src/librustc_trans/back/write.rs
+++ b/src/librustc_trans/back/write.rs
@@ -23,7 +23,6 @@ use syntax::diagnostic;
 use syntax::diagnostic::{Emitter, Handler, Level, mk_handler};
 
 use std::c_str::{ToCStr, CString};
-use std::comm::channel;
 use std::io::Command;
 use std::io::fs;
 use std::iter::Unfold;
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs
index e0122ad106f..a87044bb3b3 100644
--- a/src/libserialize/json.rs
+++ b/src/libserialize/json.rs
@@ -402,7 +402,7 @@ fn escape_str(wr: &mut fmt::Writer, v: &str) -> fmt::Result {
 }
 
 fn escape_char(writer: &mut fmt::Writer, v: char) -> fmt::Result {
-    let mut buf = [0, .. 4];
+    let mut buf = [0; 4];
     let n = v.encode_utf8(&mut buf).unwrap();
     let buf = unsafe { str::from_utf8_unchecked(buf[0..n]) };
     escape_str(writer, buf)
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};
diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs
index 94b7e58a54c..285d193e7da 100644
--- a/src/test/bench/msgsend-pipes-shared.rs
+++ b/src/test/bench/msgsend-pipes-shared.rs
@@ -18,8 +18,7 @@
 // different scalability characteristics compared to the select
 // version.
 
-use std::comm::{channel, Sender, Receiver};
-use std::comm;
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::os;
 use std::str::from_str;
 use std::thread::Thread;
@@ -38,8 +37,8 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
     let mut count = 0u;
     let mut done = false;
     while !done {
-        match requests.recv_opt() {
-          Ok(request::get_count) => { responses.send(count.clone()); }
+        match requests.recv() {
+          Ok(request::get_count) => { responses.send(count.clone()).unwrap(); }
           Ok(request::bytes(b)) => {
             //println!("server: received {} bytes", b);
             count += b;
@@ -48,7 +47,7 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
           _ => { }
         }
     }
-    responses.send(count);
+    responses.send(count).unwrap();
     //println!("server exiting");
 }
 
@@ -69,7 +68,7 @@ fn run(args: &[String]) {
             worker_results.push(Thread::spawn(move|| {
                 for _ in range(0u, size / workers) {
                     //println!("worker {}: sending {} bytes", i, num_bytes);
-                    to_child.send(request::bytes(num_bytes));
+                    to_child.send(request::bytes(num_bytes)).unwrap();
                 }
                 //println!("worker {} exiting", i);
             }));
@@ -83,9 +82,9 @@ fn run(args: &[String]) {
         }
 
         //println!("sending stop message");
-        to_child.send(request::stop);
+        to_child.send(request::stop).unwrap();
         move_out(to_child);
-        result = Some(from_child.recv());
+        result = Some(from_child.recv().unwrap());
     });
     let result = result.unwrap();
     print!("Count is {}\n", result);
diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs
index 4fb84c86106..ef22aac776e 100644
--- a/src/test/bench/msgsend-pipes.rs
+++ b/src/test/bench/msgsend-pipes.rs
@@ -14,9 +14,8 @@
 //
 // I *think* it's the same, more or less.
 
-use std::comm::{channel, Sender, Receiver};
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::os;
-use std::str::from_str;
 use std::thread::Thread;
 use std::time::Duration;
 use std::uint;
@@ -33,7 +32,7 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
     let mut count: uint = 0;
     let mut done = false;
     while !done {
-        match requests.recv_opt() {
+        match requests.recv() {
           Ok(request::get_count) => { responses.send(count.clone()); }
           Ok(request::bytes(b)) => {
             //println!("server: received {} bytes", b);
@@ -50,8 +49,8 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
 fn run(args: &[String]) {
     let (to_parent, from_child) = channel();
 
-    let size = from_str::<uint>(args[1].as_slice()).unwrap();
-    let workers = from_str::<uint>(args[2].as_slice()).unwrap();
+    let size = args[1].parse::<uint>().unwrap();
+    let workers = args[2].parse::<uint>().unwrap();
     let num_bytes = 100;
     let mut result = None;
     let mut to_parent = Some(to_parent);
@@ -93,7 +92,7 @@ fn run(args: &[String]) {
         //println!("sending stop message");
         //to_child.send(stop);
         //move_out(to_child);
-        result = Some(from_child.recv());
+        result = Some(from_child.recv().unwrap());
     });
     let result = result.unwrap();
     print!("Count is {}\n", result);
diff --git a/src/test/bench/rt-messaging-ping-pong.rs b/src/test/bench/rt-messaging-ping-pong.rs
index d3a340d488b..de9e6629fbf 100644
--- a/src/test/bench/rt-messaging-ping-pong.rs
+++ b/src/test/bench/rt-messaging-ping-pong.rs
@@ -17,7 +17,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::comm::channel;
+use std::sync::mpsc::channel;
 use std::os;
 use std::str::from_str;
 use std::thread::Thread;
diff --git a/src/test/bench/rt-parfib.rs b/src/test/bench/rt-parfib.rs
index 0a513c32aaf..8b212555d40 100644
--- a/src/test/bench/rt-parfib.rs
+++ b/src/test/bench/rt-parfib.rs
@@ -8,9 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::comm::channel;
+use std::sync::mpsc::channel;
 use std::os;
-use std::str::from_str;
 use std::thread::Thread;
 use std::uint;
 
@@ -28,7 +27,7 @@ fn parfib(n: uint) -> uint {
         tx.send(parfib(n-1));
     }).detach();
     let m2 = parfib(n-2);
-    return (rx.recv() + m2);
+    return (rx.recv().unwrap() + m2);
 }
 
 fn main() {
@@ -36,7 +35,7 @@ fn main() {
     let args = os::args();
     let args = args.as_slice();
     let n = if args.len() == 2 {
-        from_str::<uint>(args[1].as_slice()).unwrap()
+        args[1].parse::<uint>().unwrap()
     } else {
         10
     };
diff --git a/src/test/bench/shootout-binarytrees.rs b/src/test/bench/shootout-binarytrees.rs
index 236e1cbb217..c7a43d61a9a 100644
--- a/src/test/bench/shootout-binarytrees.rs
+++ b/src/test/bench/shootout-binarytrees.rs
@@ -75,7 +75,7 @@ fn main() {
     } else if args.len() <= 1u {
         8
     } else {
-        from_str(args[1].as_slice()).unwrap()
+        args[1].parse().unwrap()
     };
     let min_depth = 4;
     let max_depth = if min_depth + 2 > n {min_depth + 2} else {n};
diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs
index 6bbf6cde4ea..030c627b6f7 100644
--- a/src/test/bench/shootout-chameneos-redux.rs
+++ b/src/test/bench/shootout-chameneos-redux.rs
@@ -41,7 +41,7 @@
 // no-pretty-expanded
 
 use self::Color::{Red, Yellow, Blue};
-use std::comm::{channel, Sender, Receiver};
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::fmt;
 use std::str::from_str;
 use std::thread::Thread;
@@ -154,7 +154,7 @@ fn creature(
 
     loop {
         // ask for a pairing
-        to_rendezvous.send(CreatureInfo {name: name, color: color});
+        to_rendezvous.send(CreatureInfo {name: name, color: color}).unwrap();
 
         // log and change, or quit
         match rendezvous.next() {
@@ -172,7 +172,7 @@ fn creature(
     }
     // log creatures met and evil clones of self
     let report = format!("{}{}", creatures_met, Number(evil_clones_met));
-    to_rendezvous_log.send(report);
+    to_rendezvous_log.send(report).unwrap();
 }
 
 fn rendezvous(nn: uint, set: Vec<Color>) {
@@ -204,13 +204,13 @@ fn rendezvous(nn: uint, set: Vec<Color>) {
 
     // set up meetings...
     for _ in range(0, nn) {
-        let fst_creature = from_creatures.recv();
-        let snd_creature = from_creatures.recv();
+        let fst_creature = from_creatures.recv().unwrap();
+        let snd_creature = from_creatures.recv().unwrap();
 
         creatures_met += 2;
 
-        to_creature[fst_creature.name].send(snd_creature);
-        to_creature[snd_creature.name].send(fst_creature);
+        to_creature[fst_creature.name].send(snd_creature).unwrap();
+        to_creature[snd_creature.name].send(fst_creature).unwrap();
     }
 
     // tell each creature to stop
diff --git a/src/test/bench/shootout-fannkuch-redux.rs b/src/test/bench/shootout-fannkuch-redux.rs
index 8e594b86180..7dca2b24fc1 100644
--- a/src/test/bench/shootout-fannkuch-redux.rs
+++ b/src/test/bench/shootout-fannkuch-redux.rs
@@ -186,7 +186,7 @@ fn fannkuch(n: i32) -> (i32, i32) {
 fn main() {
     let n = std::os::args().as_slice()
         .get(1)
-        .and_then(|arg| from_str(arg.as_slice()))
+        .and_then(|arg| arg.parse())
         .unwrap_or(2i32);
 
     let (checksum, maxflips) = fannkuch(n);
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index b59eef916dc..d92d30ca844 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -20,7 +20,7 @@ extern crate collections;
 use std::ascii::{AsciiExt, OwnedAsciiExt};
 use std::cmp::Ordering::{mod, Less, Greater, Equal};
 use std::collections::HashMap;
-use std::comm::{channel, Sender, Receiver};
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::mem::replace;
 use std::num::Float;
 use std::option;
@@ -120,7 +120,7 @@ fn make_sequence_processor(sz: uint,
 
    loop {
 
-       line = from_parent.recv();
+       line = from_parent.recv().unwrap();
        if line == Vec::new() { break; }
 
        carry.push_all(line.as_slice());
@@ -222,6 +222,6 @@ fn main() {
 
    // now fetch and print result messages
    for (ii, _sz) in sizes.iter().enumerate() {
-       println!("{}", from_child[ii].recv());
+       println!("{}", from_child[ii].recv().unwrap());
    }
 }
diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs
index 2e229a50d16..0c3152d4780 100644
--- a/src/test/bench/shootout-meteor.rs
+++ b/src/test/bench/shootout-meteor.rs
@@ -40,7 +40,7 @@
 
 // no-pretty-expanded FIXME #15189
 
-use std::comm::channel;
+use std::sync::mpsc::channel;
 use std::sync::Arc;
 use std::thread::Thread;
 
@@ -315,13 +315,13 @@ fn par_search(masks: Vec<Vec<Vec<u64>>>) -> Data {
         Thread::spawn(move|| {
             let mut data = Data::new();
             search(&*masks, m, 1, List::Cons(m, &List::Nil), &mut data);
-            tx.send(data);
+            tx.send(data).unwrap();
         }).detach();
     }
 
     // collecting the results
     drop(tx);
-    let mut data = rx.recv();
+    let mut data = rx.recv().unwrap();
     for d in rx.iter() { data.reduce_from(d); }
     data
 }
diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs
index e58303a724a..78b5ac00b45 100644
--- a/src/test/bench/shootout-pfib.rs
+++ b/src/test/bench/shootout-pfib.rs
@@ -20,7 +20,7 @@
 
 extern crate getopts;
 
-use std::comm::{channel, Sender};
+use std::sync::mpsc::{channel, Sender};
 use std::os;
 use std::result::Result::{Ok, Err};
 use std::str::from_str;
@@ -30,22 +30,22 @@ use std::time::Duration;
 fn fib(n: int) -> int {
     fn pfib(tx: &Sender<int>, n: int) {
         if n == 0 {
-            tx.send(0);
+            tx.send(0).unwrap();
         } else if n <= 2 {
-            tx.send(1);
+            tx.send(1).unwrap();
         } else {
             let (tx1, rx) = channel();
             let tx2 = tx1.clone();
             Thread::spawn(move|| pfib(&tx2, n - 1)).detach();
             let tx2 = tx1.clone();
             Thread::spawn(move|| pfib(&tx2, n - 2)).detach();
-            tx.send(rx.recv() + rx.recv());
+            tx.send(rx.recv().unwrap() + rx.recv().unwrap());
         }
     }
 
     let (tx, rx) = channel();
     Thread::spawn(move|| pfib(&tx, n) ).detach();
-    rx.recv()
+    rx.recv().unwrap()
 }
 
 struct Config {
diff --git a/src/test/bench/shootout-threadring.rs b/src/test/bench/shootout-threadring.rs
index 94d958ea8d5..543597d8c81 100644
--- a/src/test/bench/shootout-threadring.rs
+++ b/src/test/bench/shootout-threadring.rs
@@ -38,7 +38,7 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 // OF THE POSSIBILITY OF SUCH DAMAGE.
 
-use std::comm::{channel, Sender, Receiver};
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::str::from_str;
 use std::thread::Thread;
 
diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs
index 287b3fc6c46..a0278a63a51 100644
--- a/src/test/bench/task-perf-jargon-metal-smoke.rs
+++ b/src/test/bench/task-perf-jargon-metal-smoke.rs
@@ -17,14 +17,14 @@
 
 // ignore-pretty very bad with line comments
 
-use std::comm::{mod, channel};
+use std::sync::mpsc::{channel, Sender};
 use std::os;
 use std::str::from_str;
 use std::task;
 use std::thread::Thread;
 use std::uint;
 
-fn child_generation(gens_left: uint, tx: comm::Sender<()>) {
+fn child_generation(gens_left: uint, tx: Sender<()>) {
     // This used to be O(n^2) in the number of generations that ever existed.
     // With this code, only as many generations are alive at a time as tasks
     // alive at a time,
@@ -35,7 +35,7 @@ fn child_generation(gens_left: uint, tx: comm::Sender<()>) {
         if gens_left > 0 {
             child_generation(gens_left - 1, tx); // recurse
         } else {
-            tx.send(())
+            tx.send(()).unwrap()
         }
     }).detach();
 }
@@ -52,7 +52,7 @@ fn main() {
 
     let (tx, rx) = channel();
     child_generation(from_str::<uint>(args[1].as_slice()).unwrap(), tx);
-    if rx.recv_opt().is_err() {
+    if rx.recv().is_err() {
         panic!("it happened when we slumbered");
     }
 }
diff --git a/src/test/compile-fail/issue-19883.rs b/src/test/compile-fail/issue-19883.rs
index 5f1d0f4ab7b..b86e553e100 100644
--- a/src/test/compile-fail/issue-19883.rs
+++ b/src/test/compile-fail/issue-19883.rs
@@ -19,7 +19,7 @@ trait From<Src> {
 trait To {
     // This is a typo, the return type should be `<Dst as From<Self>>::Output`
     fn to<Dst: From<Self>>(self) -> <Dst as From<Self>>::Dst {
-    //~ error: the trait `core::kinds::Sized` is not implemented
+    //~^ error: the trait `core::kinds::Sized` is not implemented
         From::from(self)
     }
 }