about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-01 23:53:35 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-03 23:43:57 -0800
commit7d8d06f86b48520814596bd5363d2b82bc619774 (patch)
treeeda093ca208286fd8679da8de9f3597b7a024c50 /src/test
parent470118f3e915cdc8f936aca0640b28a7a3d8dc6c (diff)
downloadrust-7d8d06f86b48520814596bd5363d2b82bc619774.tar.gz
rust-7d8d06f86b48520814596bd5363d2b82bc619774.zip
Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/cci_capture_clause.rs6
-rw-r--r--src/test/auxiliary/static-methods-crate.rs3
-rw-r--r--src/test/bench/core-map.rs3
-rw-r--r--src/test/bench/core-set.rs3
-rw-r--r--src/test/bench/core-std.rs17
-rw-r--r--src/test/bench/core-uint-to-str.rs3
-rw-r--r--src/test/bench/msgsend-pipes-shared.rs5
-rw-r--r--src/test/bench/msgsend-ring-mutex-arcs.rs5
-rw-r--r--src/test/bench/rt-messaging-ping-pong.rs5
-rw-r--r--src/test/bench/shootout-ackermann.rs3
-rw-r--r--src/test/bench/shootout-chameneos-redux.rs5
-rw-r--r--src/test/bench/shootout-fasta-redux.rs6
-rw-r--r--src/test/bench/shootout-fasta.rs3
-rw-r--r--src/test/bench/shootout-fibo.rs3
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs17
-rw-r--r--src/test/bench/shootout-k-nucleotide.rs18
-rw-r--r--src/test/bench/shootout-mandelbrot.rs22
-rw-r--r--src/test/bench/shootout-meteor.rs5
-rw-r--r--src/test/bench/shootout-nbody.rs3
-rw-r--r--src/test/bench/shootout-pfib.rs3
-rw-r--r--src/test/bench/shootout-regex-dna.rs5
-rw-r--r--src/test/bench/shootout-reverse-complement.rs4
-rw-r--r--src/test/bench/shootout-spectralnorm.rs11
-rw-r--r--src/test/bench/shootout-threadring.rs5
-rw-r--r--src/test/bench/std-smallintmap.rs5
-rw-r--r--src/test/bench/sudoku.rs18
-rw-r--r--src/test/bench/task-perf-alloc-unwind.rs6
-rw-r--r--src/test/bench/task-perf-jargon-metal-smoke.rs6
-rw-r--r--src/test/bench/task-perf-spawnalot.rs9
-rw-r--r--src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs26
-rw-r--r--src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs31
-rw-r--r--src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs26
-rw-r--r--src/test/compile-fail/atomicoption-not-send-ref.rs16
-rw-r--r--src/test/compile-fail/atomicoption-not-send.rs16
-rw-r--r--src/test/compile-fail/borrowck-for-loop-head-linkage.rs4
-rw-r--r--src/test/compile-fail/borrowck-loan-blocks-move-cc.rs6
-rw-r--r--src/test/compile-fail/borrowck-multiple-captures.rs10
-rw-r--r--src/test/compile-fail/deriving-span-Zero-struct.rs23
-rw-r--r--src/test/compile-fail/deriving-span-Zero-tuple-struct.rs23
-rw-r--r--src/test/compile-fail/future_not_copyable.rs2
-rw-r--r--src/test/compile-fail/hashmap-lifetimes.rs2
-rw-r--r--src/test/compile-fail/issue-11374.rs2
-rw-r--r--src/test/compile-fail/issue-15783.rs2
-rw-r--r--src/test/compile-fail/issue-17728.rs2
-rw-r--r--src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs4
-rw-r--r--src/test/compile-fail/no-capture-arc.rs4
-rw-r--r--src/test/compile-fail/no-reuse-move-arc.rs4
-rw-r--r--src/test/compile-fail/no-send-res-ports.rs4
-rw-r--r--src/test/compile-fail/spawn-non-nil-fn.rs17
-rw-r--r--src/test/compile-fail/std-uncopyable-atomics.rs2
-rw-r--r--src/test/run-fail/rt-set-exit-status-panic2.rs4
-rw-r--r--src/test/run-fail/task-spawn-barefn.rs4
-rw-r--r--src/test/run-make/lto-syntax-extension/main.rs7
-rw-r--r--src/test/run-make/static-unwinding/main.rs6
-rw-r--r--src/test/run-make/unicode-input/span_length.rs6
-rw-r--r--src/test/run-pass/child-outlives-parent.rs4
-rw-r--r--src/test/run-pass/clone-with-exterior.rs4
-rw-r--r--src/test/run-pass/comm.rs4
-rw-r--r--src/test/run-pass/const-str-ptr.rs8
-rw-r--r--src/test/run-pass/deriving-zero.rs71
-rw-r--r--src/test/run-pass/drop-trait-enum.rs12
-rw-r--r--src/test/run-pass/extern-call-deep2.rs4
-rw-r--r--src/test/run-pass/extern-call-scrub.rs4
-rw-r--r--src/test/run-pass/extern-stress.rs12
-rw-r--r--src/test/run-pass/extern-yield.rs12
-rw-r--r--src/test/run-pass/hashmap-memory.rs4
-rw-r--r--src/test/run-pass/issue-13323.rs2
-rw-r--r--src/test/run-pass/issue-15149.rs1
-rw-r--r--src/test/run-pass/issue-17718.rs22
-rw-r--r--src/test/run-pass/issue-2383.rs2
-rw-r--r--src/test/run-pass/issue-2718.rs4
-rw-r--r--src/test/run-pass/issue-2804.rs2
-rw-r--r--src/test/run-pass/issue-2989.rs6
-rw-r--r--src/test/run-pass/issue-3563-3.rs27
-rw-r--r--src/test/run-pass/issue-3609.rs4
-rw-r--r--src/test/run-pass/issue-8460.rs42
-rw-r--r--src/test/run-pass/ivec-tag.rs4
-rw-r--r--src/test/run-pass/kindck-implicit-close-over-mut-var.rs8
-rw-r--r--src/test/run-pass/match-with-ret-arm.rs3
-rw-r--r--src/test/run-pass/mod-view-items.rs2
-rw-r--r--src/test/run-pass/moves-based-on-type-capture-clause.rs4
-rw-r--r--src/test/run-pass/no-landing-pads.rs6
-rw-r--r--src/test/run-pass/panic-in-dtor-drops-fields.rs6
-rw-r--r--src/test/run-pass/realloc-16687.rs3
-rw-r--r--src/test/run-pass/running-with-no-runtime.rs4
-rw-r--r--src/test/run-pass/send-resource.rs4
-rw-r--r--src/test/run-pass/send_str_hashmap.rs5
-rw-r--r--src/test/run-pass/send_str_treemap.rs5
-rw-r--r--src/test/run-pass/sendfn-spawn-with-fn-arg.rs6
-rw-r--r--src/test/run-pass/sepcomp-unwind.rs4
-rw-r--r--src/test/run-pass/slice-panic-1.rs4
-rw-r--r--src/test/run-pass/slice-panic-2.rs4
-rw-r--r--src/test/run-pass/spawn-fn.rs10
-rw-r--r--src/test/run-pass/spawn-types.rs5
-rw-r--r--src/test/run-pass/spawn.rs4
-rw-r--r--src/test/run-pass/spawn2.rs7
-rw-r--r--src/test/run-pass/task-comm-0.rs4
-rw-r--r--src/test/run-pass/task-comm-1.rs4
-rw-r--r--src/test/run-pass/task-comm-10.rs6
-rw-r--r--src/test/run-pass/task-comm-11.rs8
-rw-r--r--src/test/run-pass/task-comm-13.rs6
-rw-r--r--src/test/run-pass/task-comm-14.rs8
-rw-r--r--src/test/run-pass/task-comm-15.rs6
-rw-r--r--src/test/run-pass/task-comm-17.rs4
-rw-r--r--src/test/run-pass/task-comm-7.rs10
-rw-r--r--src/test/run-pass/task-life-0.rs4
-rw-r--r--src/test/run-pass/task-spawn-move-and-copy.rs4
-rw-r--r--src/test/run-pass/tcp-accept-stress.rs11
-rw-r--r--src/test/run-pass/tcp-connect-timeouts.rs3
-rw-r--r--src/test/run-pass/tempfile.rs22
-rw-r--r--src/test/run-pass/terminate-in-initializer.rs6
-rw-r--r--src/test/run-pass/threads.rs7
-rw-r--r--src/test/run-pass/trait-bounds-in-arc.rs8
-rw-r--r--src/test/run-pass/unique-send-2.rs6
-rw-r--r--src/test/run-pass/unit-like-struct-drop-run.rs6
-rw-r--r--src/test/run-pass/unwind-resource.rs4
-rw-r--r--src/test/run-pass/unwind-unique.rs4
-rw-r--r--src/test/run-pass/utf8_chars.rs34
-rw-r--r--src/test/run-pass/vector-sort-panic-safe.rs36
-rw-r--r--src/test/run-pass/wait-forked-but-failed-child.rs13
-rw-r--r--src/test/run-pass/weak-lang-item.rs4
-rw-r--r--src/test/run-pass/yield2.rs4
122 files changed, 396 insertions, 645 deletions
diff --git a/src/test/auxiliary/cci_capture_clause.rs b/src/test/auxiliary/cci_capture_clause.rs
index ec470ddc213..ec4c0281d55 100644
--- a/src/test/auxiliary/cci_capture_clause.rs
+++ b/src/test/auxiliary/cci_capture_clause.rs
@@ -8,13 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{Receiver, channel};
 
 pub fn foo<T:Send + Clone>(x: T) -> Receiver<T> {
     let (tx, rx) = channel();
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         tx.send(x.clone());
-    });
+    }).detach();
     rx
 }
diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs
index ea4751bf4ed..1b18571cf8c 100644
--- a/src/test/auxiliary/static-methods-crate.rs
+++ b/src/test/auxiliary/static-methods-crate.rs
@@ -12,7 +12,6 @@
 #![crate_type = "lib"]
 
 use std::int;
-use std::str::from_str;
 
 pub trait read {
     fn readMaybe(s: String) -> Option<Self>;
@@ -20,7 +19,7 @@ pub trait read {
 
 impl read for int {
     fn readMaybe(s: String) -> Option<int> {
-        from_str::<int>(s.as_slice())
+        s.parse()
     }
 }
 
diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs
index 0ada1cb991c..c978046e391 100644
--- a/src/test/bench/core-map.rs
+++ b/src/test/bench/core-map.rs
@@ -13,7 +13,6 @@
 use std::collections::{BTreeMap, HashMap, HashSet};
 use std::os;
 use std::rand::{Rng, IsaacRng, SeedableRng};
-use std::str::from_str;
 use std::time::Duration;
 use std::uint;
 
@@ -107,7 +106,7 @@ fn main() {
     let args = args.as_slice();
     let n_keys = {
         if args.len() == 2 {
-            from_str::<uint>(args[1].as_slice()).unwrap()
+            args[1].parse::<uint>().unwrap()
         } else {
             1000000
         }
diff --git a/src/test/bench/core-set.rs b/src/test/bench/core-set.rs
index 52380001c6c..491d910f351 100644
--- a/src/test/bench/core-set.rs
+++ b/src/test/bench/core-set.rs
@@ -20,7 +20,6 @@ use std::collections::BitvSet;
 use std::collections::HashSet;
 use std::hash::Hash;
 use std::os;
-use std::str::from_str;
 use std::time::Duration;
 use std::uint;
 
@@ -181,7 +180,7 @@ fn main() {
     let args = args.as_slice();
     let num_keys = {
         if args.len() == 2 {
-            from_str::<uint>(args[1].as_slice()).unwrap()
+            args[1].parse::<uint>().unwrap()
         } else {
             100 // woefully inadequate for any real measurement
         }
diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs
index 26d4ec25c64..ee7c442da19 100644
--- a/src/test/bench/core-std.rs
+++ b/src/test/bench/core-std.rs
@@ -15,6 +15,7 @@
 #![feature(unboxed_closures)]
 
 use std::io::File;
+use std::iter::repeat;
 use std::mem::swap;
 use std::os;
 use std::rand::Rng;
@@ -61,7 +62,7 @@ fn maybe_run_test<F>(argv: &[String], name: String, test: F) where F: FnOnce() {
 }
 
 fn shift_push() {
-    let mut v1 = Vec::from_elem(30000, 1i);
+    let mut v1 = repeat(1i).take(30000).collect::<Vec<_>>();
     let mut v2 = Vec::new();
 
     while v1.len() > 0 {
@@ -88,7 +89,7 @@ fn vec_plus() {
     let mut v = Vec::new();
     let mut i = 0;
     while i < 1500 {
-        let rv = Vec::from_elem(r.gen_range(0u, i + 1), i);
+        let rv = repeat(i).take(r.gen_range(0u, i + 1)).collect::<Vec<_>>();
         if r.gen() {
             v.extend(rv.into_iter());
         } else {
@@ -106,7 +107,7 @@ fn vec_append() {
     let mut v = Vec::new();
     let mut i = 0;
     while i < 1500 {
-        let rv = Vec::from_elem(r.gen_range(0u, i + 1), i);
+        let rv = repeat(i).take(r.gen_range(0u, i + 1)).collect::<Vec<_>>();
         if r.gen() {
             let mut t = v.clone();
             t.push_all(rv.as_slice());
@@ -126,7 +127,7 @@ fn vec_push_all() {
 
     let mut v = Vec::new();
     for i in range(0u, 1500) {
-        let mut rv = Vec::from_elem(r.gen_range(0u, i + 1), i);
+        let mut rv = repeat(i).take(r.gen_range(0u, i + 1)).collect::<Vec<_>>();
         if r.gen() {
             v.push_all(rv.as_slice());
         }
@@ -141,8 +142,8 @@ fn is_utf8_ascii() {
     let mut v : Vec<u8> = Vec::new();
     for _ in range(0u, 20000) {
         v.push('b' as u8);
-        if !str::is_utf8(v.as_slice()) {
-            panic!("is_utf8 panicked");
+        if str::from_utf8(v.as_slice()).is_err() {
+            panic!("from_utf8 panicked");
         }
     }
 }
@@ -152,8 +153,8 @@ fn is_utf8_multibyte() {
     let mut v : Vec<u8> = Vec::new();
     for _ in range(0u, 5000) {
         v.push_all(s.as_bytes());
-        if !str::is_utf8(v.as_slice()) {
-            panic!("is_utf8 panicked");
+        if str::from_utf8(v.as_slice()).is_err() {
+            panic!("from_utf8 panicked");
         }
     }
 }
diff --git a/src/test/bench/core-uint-to-str.rs b/src/test/bench/core-uint-to-str.rs
index 08637b4bf1c..0235482ca2c 100644
--- a/src/test/bench/core-uint-to-str.rs
+++ b/src/test/bench/core-uint-to-str.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use std::os;
-use std::str::from_str;
 use std::uint;
 
 fn main() {
@@ -22,7 +21,7 @@ fn main() {
         args.into_iter().collect()
     };
 
-    let n = from_str::<uint>(args[1].as_slice()).unwrap();
+    let n = args[1].parse().unwrap();
 
     for i in range(0u, n) {
         let x = i.to_string();
diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs
index 285d193e7da..d1126e74252 100644
--- a/src/test/bench/msgsend-pipes-shared.rs
+++ b/src/test/bench/msgsend-pipes-shared.rs
@@ -20,7 +20,6 @@
 
 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;
@@ -55,8 +54,8 @@ fn run(args: &[String]) {
     let (to_parent, from_child) = channel();
     let (to_child, from_parent) = 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 p = Some((to_child, to_parent, from_parent));
diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs
index 3ead5ef64fd..ef5e8f3f4bb 100644
--- a/src/test/bench/msgsend-ring-mutex-arcs.rs
+++ b/src/test/bench/msgsend-ring-mutex-arcs.rs
@@ -19,7 +19,6 @@
 // ignore-lexer-test FIXME #15679
 
 use std::os;
-use std::str::from_str;
 use std::sync::{Arc, Future, Mutex, Condvar};
 use std::time::Duration;
 use std::uint;
@@ -74,8 +73,8 @@ fn main() {
         args.clone().into_iter().collect()
     };
 
-    let num_tasks = from_str::<uint>(args[1].as_slice()).unwrap();
-    let msg_per_task = from_str::<uint>(args[2].as_slice()).unwrap();
+    let num_tasks = args[1].parse::<uint>().unwrap();
+    let msg_per_task = args[2].parse::<uint>().unwrap();
 
     let (mut num_chan, num_port) = init();
 
diff --git a/src/test/bench/rt-messaging-ping-pong.rs b/src/test/bench/rt-messaging-ping-pong.rs
index de9e6629fbf..a3f1bc74b44 100644
--- a/src/test/bench/rt-messaging-ping-pong.rs
+++ b/src/test/bench/rt-messaging-ping-pong.rs
@@ -19,7 +19,6 @@
 
 use std::sync::mpsc::channel;
 use std::os;
-use std::str::from_str;
 use std::thread::Thread;
 use std::uint;
 
@@ -66,13 +65,13 @@ fn main() {
     let args = os::args();
     let args = args.as_slice();
     let n = if args.len() == 3 {
-        from_str::<uint>(args[1].as_slice()).unwrap()
+        args[1].parse::<uint>().unwrap()
     } else {
         10000
     };
 
     let m = if args.len() == 3 {
-        from_str::<uint>(args[2].as_slice()).unwrap()
+        args[2].parse::<uint>().unwrap()
     } else {
         4
     };
diff --git a/src/test/bench/shootout-ackermann.rs b/src/test/bench/shootout-ackermann.rs
index f7810d5d740..e66fffd04e3 100644
--- a/src/test/bench/shootout-ackermann.rs
+++ b/src/test/bench/shootout-ackermann.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use std::os;
-use std::str::from_str;
 
 fn ack(m: int, n: int) -> int {
     if m == 0 {
@@ -32,6 +31,6 @@ fn main() {
     } else {
         args.into_iter().collect()
     };
-    let n = from_str::<int>(args[1].as_slice()).unwrap();
+    let n = args[1].parse().unwrap();
     println!("Ack(3,{}): {}\n", n, ack(3, n));
 }
diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs
index 030c627b6f7..96bca25d1c4 100644
--- a/src/test/bench/shootout-chameneos-redux.rs
+++ b/src/test/bench/shootout-chameneos-redux.rs
@@ -43,7 +43,6 @@
 use self::Color::{Red, Yellow, Blue};
 use std::sync::mpsc::{channel, Sender, Receiver};
 use std::fmt;
-use std::str::from_str;
 use std::thread::Thread;
 
 fn print_complements() {
@@ -235,8 +234,8 @@ fn main() {
     } else {
         std::os::args().as_slice()
                        .get(1)
-                       .and_then(|arg| from_str(arg.as_slice()))
-                       .unwrap_or(600)
+                       .and_then(|arg| arg.parse())
+                       .unwrap_or(600u)
     };
 
     print_complements();
diff --git a/src/test/bench/shootout-fasta-redux.rs b/src/test/bench/shootout-fasta-redux.rs
index 09f7f236f19..bbbfb0051f9 100644
--- a/src/test/bench/shootout-fasta-redux.rs
+++ b/src/test/bench/shootout-fasta-redux.rs
@@ -42,9 +42,9 @@
 
 use std::cmp::min;
 use std::io::{stdout, IoResult};
+use std::iter::repeat;
 use std::os;
 use std::slice::bytes::copy_memory;
-use std::str::from_str;
 
 const LINE_LEN: uint = 60;
 const LOOKUP_SIZE: uint = 4 * 1024;
@@ -124,7 +124,7 @@ impl<'a, W: Writer> RepeatFasta<'a, W> {
 
     fn make(&mut self, n: uint) -> IoResult<()> {
         let alu_len = self.alu.len();
-        let mut buf = Vec::from_elem(alu_len + LINE_LEN, 0u8);
+        let mut buf = repeat(0u8).take(alu_len + LINE_LEN).collect::<Vec<_>>();
         let alu: &[u8] = self.alu.as_bytes();
 
         copy_memory(buf.as_mut_slice(), alu);
@@ -214,7 +214,7 @@ fn main() {
     let args = os::args();
     let args = args.as_slice();
     let n = if args.len() > 1 {
-        from_str::<uint>(args[1].as_slice()).unwrap()
+        args[1].parse::<uint>().unwrap()
     } else {
         5
     };
diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs
index eee42af4dbc..8777fa9689f 100644
--- a/src/test/bench/shootout-fasta.rs
+++ b/src/test/bench/shootout-fasta.rs
@@ -45,7 +45,6 @@ use std::io::{BufferedWriter, File};
 use std::io;
 use std::num::Float;
 use std::os;
-use std::str::from_str;
 
 const LINE_LENGTH: uint = 60;
 const IM: u32 = 139968;
@@ -113,7 +112,7 @@ fn run<W: Writer>(writer: &mut W) -> std::io::IoResult<()> {
     } else if args.len() <= 1u {
         1000
     } else {
-        from_str(args[1].as_slice()).unwrap()
+        args[1].parse().unwrap()
     };
 
     let rng = &mut MyRandom::new();
diff --git a/src/test/bench/shootout-fibo.rs b/src/test/bench/shootout-fibo.rs
index cbacf415f6f..36854728ebf 100644
--- a/src/test/bench/shootout-fibo.rs
+++ b/src/test/bench/shootout-fibo.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use std::os;
-use std::str::from_str;
 
 fn fib(n: int) -> int {
     if n < 2 {
@@ -28,6 +27,6 @@ fn main() {
     } else {
         args.into_iter().collect()
     };
-    let n = from_str::<int>(args[1].as_slice()).unwrap();
+    let n = args[1].parse().unwrap();
     println!("{}\n", fib(n));
 }
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index 44abd1d09d1..8c0ec667332 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -15,17 +15,14 @@
 
 #![feature(slicing_syntax)]
 
-extern crate collections;
-
 use std::ascii::{AsciiExt, OwnedAsciiExt};
 use std::cmp::Ordering::{self, Less, Greater, Equal};
 use std::collections::HashMap;
-use std::sync::mpsc::{channel, Sender, Receiver};
 use std::mem::replace;
 use std::num::Float;
 use std::option;
 use std::os;
-use std::string::IntoString;
+use std::sync::mpsc::{channel, Sender, Receiver};
 use std::thread::Thread;
 
 fn f64_cmp(x: f64, y: f64) -> Ordering {
@@ -87,7 +84,7 @@ fn find(mm: &HashMap<Vec<u8> , uint>, key: String) -> uint {
 // given a map, increment the counter for a key
 fn update_freq(mm: &mut HashMap<Vec<u8> , uint>, key: &[u8]) {
     let key = key.to_vec();
-    let newval = match mm.pop(&key) {
+    let newval = match mm.remove(&key) {
         Some(v) => v + 1,
         None => 1
     };
@@ -142,7 +139,7 @@ fn make_sequence_processor(sz: uint,
         _ => { "".to_string() }
    };
 
-    to_parent.send(buffer);
+    to_parent.send(buffer).unwrap();
 }
 
 // given a FASTA file on stdin, process sequence THREE
@@ -159,7 +156,9 @@ fn main() {
 
     // initialize each sequence sorter
     let sizes = vec!(1u,2,3,4,6,12,18);
-    let mut streams = Vec::from_fn(sizes.len(), |_| Some(channel::<String>()));
+    let mut streams = range(0, sizes.len()).map(|_| {
+        Some(channel::<String>())
+    }).collect::<Vec<_>>();
     let mut from_child = Vec::new();
     let to_child  = sizes.iter().zip(streams.iter_mut()).map(|(sz, stream_ref)| {
         let sz = *sz;
@@ -206,7 +205,7 @@ fn main() {
 
                for (ii, _sz) in sizes.iter().enumerate() {
                    let lb = line_bytes.to_vec();
-                   to_child[ii].send(lb);
+                   to_child[ii].send(lb).unwrap();
                }
            }
 
@@ -217,7 +216,7 @@ fn main() {
 
    // finish...
    for (ii, _sz) in sizes.iter().enumerate() {
-       to_child[ii].send(Vec::new());
+       to_child[ii].send(Vec::new()).unwrap();
    }
 
    // now fetch and print result messages
diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs
index df5baac7dbe..359f06d0cf5 100644
--- a/src/test/bench/shootout-k-nucleotide.rs
+++ b/src/test/bench/shootout-k-nucleotide.rs
@@ -43,8 +43,10 @@
 #![feature(associated_types, slicing_syntax)]
 
 use std::ascii::OwnedAsciiExt;
+use std::iter::repeat;
 use std::slice;
-use std::sync::{Arc, Future};
+use std::sync::Arc;
+use std::thread::Thread;
 
 static TABLE: [u8;4] = [ 'A' as u8, 'C' as u8, 'G' as u8, 'T' as u8 ];
 static TABLE_SIZE: uint = 2 << 16;
@@ -136,7 +138,7 @@ struct Items<'a> {
 impl Table {
     fn new() -> Table {
         Table {
-            items: Vec::from_fn(TABLE_SIZE, |_| None),
+            items: range(0, TABLE_SIZE).map(|_| None).collect()
         }
     }
 
@@ -300,19 +302,19 @@ fn main() {
     };
     let input = Arc::new(input);
 
-    let nb_freqs: Vec<(uint, Future<Table>)> = range(1u, 3).map(|i| {
+    let nb_freqs: Vec<_> = range(1u, 3).map(|i| {
         let input = input.clone();
-        (i, Future::spawn(move|| generate_frequencies(input.as_slice(), i)))
+        (i, Thread::spawn(move|| generate_frequencies(input.as_slice(), i)))
     }).collect();
-    let occ_freqs: Vec<Future<Table>> = OCCURRENCES.iter().map(|&occ| {
+    let occ_freqs: Vec<_> = OCCURRENCES.iter().map(|&occ| {
         let input = input.clone();
-        Future::spawn(move|| generate_frequencies(input.as_slice(), occ.len()))
+        Thread::spawn(move|| generate_frequencies(input.as_slice(), occ.len()))
     }).collect();
 
     for (i, freq) in nb_freqs.into_iter() {
-        print_frequencies(&freq.unwrap(), i);
+        print_frequencies(&freq.join().ok().unwrap(), i);
     }
     for (&occ, freq) in OCCURRENCES.iter().zip(occ_freqs.into_iter()) {
-        print_occurrences(&mut freq.unwrap(), occ);
+        print_occurrences(&mut freq.join().ok().unwrap(), occ);
     }
 }
diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs
index 51ce4cbaa84..4e8e0d64d52 100644
--- a/src/test/bench/shootout-mandelbrot.rs
+++ b/src/test/bench/shootout-mandelbrot.rs
@@ -47,8 +47,8 @@
 use std::io;
 use std::os;
 use std::simd::f64x2;
-use std::str::from_str;
-use std::sync::{Arc, Future};
+use std::sync::Arc;
+use std::thread::Thread;
 
 const ITER: int = 50;
 const LIMIT: f64 = 2.0;
@@ -82,8 +82,8 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
     let mut precalc_r = Vec::with_capacity(w);
     let mut precalc_i = Vec::with_capacity(h);
 
-    let precalc_futures = Vec::from_fn(WORKERS, |i| {
-        Future::spawn(move|| {
+    let precalc_futures = range(0, WORKERS).map(|i| {
+        Thread::spawn(move|| {
             let mut rs = Vec::with_capacity(w / WORKERS);
             let mut is = Vec::with_capacity(w / WORKERS);
 
@@ -106,10 +106,10 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
 
             (rs, is)
         })
-    });
+    }).collect::<Vec<_>>();
 
     for res in precalc_futures.into_iter() {
-        let (rs, is) = res.unwrap();
+        let (rs, is) = res.join().ok().unwrap();
         precalc_r.extend(rs.into_iter());
         precalc_i.extend(is.into_iter());
     }
@@ -120,11 +120,11 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
     let arc_init_r = Arc::new(precalc_r);
     let arc_init_i = Arc::new(precalc_i);
 
-    let data = Vec::from_fn(WORKERS, |i| {
+    let data = range(0, WORKERS).map(|i| {
         let vec_init_r = arc_init_r.clone();
         let vec_init_i = arc_init_i.clone();
 
-        Future::spawn(move|| {
+        Thread::spawn(move|| {
             let mut res: Vec<u8> = Vec::with_capacity((chunk_size * w) / 8);
             let init_r_slice = vec_init_r.as_slice();
 
@@ -141,11 +141,11 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
 
             res
         })
-    });
+    }).collect::<Vec<_>>();
 
     try!(writeln!(&mut out as &mut Writer, "P4\n{} {}", w, h));
     for res in data.into_iter() {
-        try!(out.write(res.unwrap().as_slice()));
+        try!(out.write(res.join().ok().unwrap().as_slice()));
     }
     out.flush()
 }
@@ -206,7 +206,7 @@ fn main() {
                   which interferes with the test runner.");
         mandelbrot(1000, io::util::NullWriter)
     } else {
-        mandelbrot(from_str(args[1].as_slice()).unwrap(), io::stdout())
+        mandelbrot(args[1].parse().unwrap(), io::stdout())
     };
     res.unwrap();
 }
diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs
index 94d99b9f118..438775d8ba0 100644
--- a/src/test/bench/shootout-meteor.rs
+++ b/src/test/bench/shootout-meteor.rs
@@ -42,8 +42,9 @@
 
 #![feature(associated_types)]
 
-use std::sync::mpsc::channel;
+use std::iter::repeat;
 use std::sync::Arc;
+use std::sync::mpsc::channel;
 use std::thread::Thread;
 
 //
@@ -220,7 +221,7 @@ fn get_id(m: u64) -> u8 {
 
 // Converts a list of mask to a Vec<u8>.
 fn to_vec(raw_sol: &List<u64>) -> Vec<u8> {
-    let mut sol = Vec::from_elem(50, '.' as u8);
+    let mut sol = repeat('.' as u8).take(50).collect::<Vec<_>>();
     for &m in raw_sol.iter() {
         let id = '0' as u8 + get_id(m);
         for i in range(0u, 50) {
diff --git a/src/test/bench/shootout-nbody.rs b/src/test/bench/shootout-nbody.rs
index 6a325798f58..7973af3722d 100644
--- a/src/test/bench/shootout-nbody.rs
+++ b/src/test/bench/shootout-nbody.rs
@@ -39,7 +39,6 @@
 // OF THE POSSIBILITY OF SUCH DAMAGE.
 
 use std::num::Float;
-use std::str::from_str;
 
 const PI: f64 = 3.141592653589793;
 const SOLAR_MASS: f64 = 4.0 * PI * PI;
@@ -176,7 +175,7 @@ fn main() {
         5000000
     } else {
         std::os::args().as_slice().get(1)
-            .and_then(|arg| from_str(arg.as_slice()))
+            .and_then(|arg| arg.parse())
             .unwrap_or(1000)
     };
     let mut bodies = BODIES;
diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs
index 78b5ac00b45..84ceb432048 100644
--- a/src/test/bench/shootout-pfib.rs
+++ b/src/test/bench/shootout-pfib.rs
@@ -23,7 +23,6 @@ extern crate getopts;
 use std::sync::mpsc::{channel, Sender};
 use std::os;
 use std::result::Result::{Ok, Err};
-use std::str::from_str;
 use std::thread::Thread;
 use std::time::Duration;
 
@@ -103,7 +102,7 @@ fn main() {
     if opts.stress {
         stress(2);
     } else {
-        let max = from_str::<uint>(args[1].as_slice()).unwrap() as int;
+        let max = args[1].parse::<int>().unwrap();
 
         let num_trials = 10;
 
diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs
index 9b8fd51c1c5..4f87171f5d3 100644
--- a/src/test/bench/shootout-regex-dna.rs
+++ b/src/test/bench/shootout-regex-dna.rs
@@ -44,12 +44,15 @@
 #![feature(macro_rules, phase, slicing_syntax)]
 
 extern crate regex;
-#[phase(plugin)]extern crate regex_macros;
 
 use std::io;
 use regex::{NoExpand, Regex};
 use std::sync::{Arc, Future};
 
+macro_rules! regex {
+    ($e:expr) => (Regex::new($e).unwrap())
+}
+
 fn count_matches(seq: &str, variant: &Regex) -> int {
     let mut n = 0;
     for _ in variant.find_iter(seq) {
diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs
index 4e60c2bee44..bbbd7aebd54 100644
--- a/src/test/bench/shootout-reverse-complement.rs
+++ b/src/test/bench/shootout-reverse-complement.rs
@@ -46,7 +46,6 @@ extern crate libc;
 
 use std::io::stdio::{stdin_raw, stdout_raw};
 use std::io::{IoResult, EndOfFile};
-use std::num::{div_rem};
 use std::ptr::{copy_memory, Unique};
 use std::thread::Thread;
 
@@ -189,7 +188,8 @@ fn reverse_complement(seq: &mut [u8], tables: &Tables) {
         i += LINE_LEN + 1;
     }
 
-    let (div, rem) = div_rem(len, 4);
+    let div = len / 4;
+    let rem = len % 4;
     unsafe {
         let mut left = seq.as_mut_ptr() as *mut u16;
         // This is slow if len % 2 != 0 but still faster than bytewise operations.
diff --git a/src/test/bench/shootout-spectralnorm.rs b/src/test/bench/shootout-spectralnorm.rs
index a5af1227a16..f3a59347225 100644
--- a/src/test/bench/shootout-spectralnorm.rs
+++ b/src/test/bench/shootout-spectralnorm.rs
@@ -43,14 +43,13 @@
 #![allow(non_snake_case)]
 #![feature(unboxed_closures)]
 
-use std::iter::AdditiveIterator;
+use std::iter::{repeat, AdditiveIterator};
 use std::thread::Thread;
 use std::mem;
 use std::num::Float;
 use std::os;
 use std::raw::Repr;
 use std::simd::f64x2;
-use std::str::from_str;
 
 fn main() {
     let args = os::args();
@@ -59,16 +58,16 @@ fn main() {
     } else if args.len() < 2 {
         2000
     } else {
-        from_str(args[1].as_slice()).unwrap()
+        args[1].parse().unwrap()
     });
     println!("{:.9}", answer);
 }
 
 fn spectralnorm(n: uint) -> f64 {
     assert!(n % 2 == 0, "only even lengths are accepted");
-    let mut u = Vec::from_elem(n, 1.0);
-    let mut v = Vec::from_elem(n, 1.0);
-    let mut tmp = Vec::from_elem(n, 1.0);
+    let mut u = repeat(1.0).take(n).collect::<Vec<_>>();
+    let mut v = u.clone();
+    let mut tmp = v.clone();
     for _ in range(0u, 10) {
         mult_AtAv(u.as_slice(), v.as_mut_slice(), tmp.as_mut_slice());
         mult_AtAv(v.as_slice(), u.as_mut_slice(), tmp.as_mut_slice());
diff --git a/src/test/bench/shootout-threadring.rs b/src/test/bench/shootout-threadring.rs
index 543597d8c81..9dd10037850 100644
--- a/src/test/bench/shootout-threadring.rs
+++ b/src/test/bench/shootout-threadring.rs
@@ -39,7 +39,6 @@
 // OF THE POSSIBILITY OF SUCH DAMAGE.
 
 use std::sync::mpsc::{channel, Sender, Receiver};
-use std::str::from_str;
 use std::thread::Thread;
 
 fn start(n_tasks: int, token: int) {
@@ -69,10 +68,10 @@ fn main() {
     let token = if std::os::getenv("RUST_BENCH").is_some() {
         2000000
     } else {
-        args.get(1).and_then(|arg| from_str(arg.as_slice())).unwrap_or(1000)
+        args.get(1).and_then(|arg| arg.parse()).unwrap_or(1000)
     };
     let n_tasks = args.get(2)
-                      .and_then(|arg| from_str(arg.as_slice()))
+                      .and_then(|arg| arg.parse())
                       .unwrap_or(503);
 
     start(n_tasks, token);
diff --git a/src/test/bench/std-smallintmap.rs b/src/test/bench/std-smallintmap.rs
index 035b222e6ce..c2e657151f0 100644
--- a/src/test/bench/std-smallintmap.rs
+++ b/src/test/bench/std-smallintmap.rs
@@ -12,7 +12,6 @@
 
 use std::collections::VecMap;
 use std::os;
-use std::str::from_str;
 use std::time::Duration;
 use std::uint;
 
@@ -37,8 +36,8 @@ fn main() {
     } else {
         args.into_iter().collect()
     };
-    let max = from_str::<uint>(args[1].as_slice()).unwrap();
-    let rep = from_str::<uint>(args[2].as_slice()).unwrap();
+    let max = args[1].parse::<uint>().unwrap();
+    let rep = args[2].parse::<uint>().unwrap();
 
     let mut checkf = Duration::seconds(0);
     let mut appendf = Duration::seconds(0);
diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs
index cccc9362a72..85e8288b5cd 100644
--- a/src/test/bench/sudoku.rs
+++ b/src/test/bench/sudoku.rs
@@ -15,9 +15,9 @@
 use std::io::BufferedReader;
 use std::io::stdio::StdReader;
 use std::io;
+use std::iter::repeat;
 use std::num::Int;
 use std::os;
-use std::str::from_str;
 
 // Computes a single solution to a given 9x9 sudoku
 //
@@ -48,9 +48,9 @@ impl Sudoku {
     }
 
     pub fn from_vec(vec: &[[u8;9];9]) -> Sudoku {
-        let g = Vec::from_fn(9u, |i| {
-            Vec::from_fn(9u, |j| { vec[i][j] })
-        });
+        let g = range(0, 9u).map(|i| {
+            range(0, 9u).map(|j| { vec[i][j] }).collect()
+        }).collect();
         return Sudoku::new(g)
     }
 
@@ -70,7 +70,8 @@ impl Sudoku {
         /* assert first line is exactly "9,9" */
         assert!(reader.read_line().unwrap() == "9,9".to_string());
 
-        let mut g = Vec::from_fn(10u, { |_i| vec!(0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8) });
+        let mut g = repeat(vec![0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8])
+                          .take(10).collect::<Vec<_>>();
         for line in reader.lines() {
             let line = line.unwrap();
             let comps: Vec<&str> = line.as_slice()
@@ -79,10 +80,9 @@ impl Sudoku {
                                        .collect();
 
             if comps.len() == 3u {
-                let row     = from_str::<uint>(comps[0]).unwrap() as u8;
-                let col     = from_str::<uint>(comps[1]).unwrap() as u8;
-                g[row as uint][col as uint] =
-                    from_str::<uint>(comps[2]).unwrap() as u8;
+                let row = comps[0].parse::<u8>().unwrap();
+                let col = comps[1].parse::<u8>().unwrap();
+                g[row as uint][col as uint] = comps[2].parse().unwrap();
             }
             else {
                 panic!("Invalid sudoku file");
diff --git a/src/test/bench/task-perf-alloc-unwind.rs b/src/test/bench/task-perf-alloc-unwind.rs
index b27a8710e32..9e78ede74ca 100644
--- a/src/test/bench/task-perf-alloc-unwind.rs
+++ b/src/test/bench/task-perf-alloc-unwind.rs
@@ -11,7 +11,7 @@
 #![feature(unsafe_destructor)]
 
 use std::os;
-use std::task;
+use std::thread::Thread;
 use std::time::Duration;
 
 #[derive(Clone)]
@@ -36,9 +36,9 @@ fn main() {
 fn run(repeat: int, depth: int) {
     for _ in range(0, repeat) {
         let dur = Duration::span(|| {
-            task::try(move|| {
+            let _ = Thread::spawn(move|| {
                 recurse_or_panic(depth, None)
-            });
+            }).join();
         });
         println!("iter: {}", dur);
     }
diff --git a/src/test/bench/task-perf-jargon-metal-smoke.rs b/src/test/bench/task-perf-jargon-metal-smoke.rs
index a0278a63a51..30918d49090 100644
--- a/src/test/bench/task-perf-jargon-metal-smoke.rs
+++ b/src/test/bench/task-perf-jargon-metal-smoke.rs
@@ -19,8 +19,6 @@
 
 use std::sync::mpsc::{channel, Sender};
 use std::os;
-use std::str::from_str;
-use std::task;
 use std::thread::Thread;
 use std::uint;
 
@@ -30,7 +28,7 @@ fn child_generation(gens_left: uint, tx: Sender<()>) {
     // alive at a time,
     Thread::spawn(move|| {
         if gens_left & 1 == 1 {
-            task::deschedule(); // shake things up a bit
+            Thread::yield_now(); // shake things up a bit
         }
         if gens_left > 0 {
             child_generation(gens_left - 1, tx); // recurse
@@ -51,7 +49,7 @@ fn main() {
     };
 
     let (tx, rx) = channel();
-    child_generation(from_str::<uint>(args[1].as_slice()).unwrap(), tx);
+    child_generation(args[1].parse().unwrap(), tx);
     if rx.recv().is_err() {
         panic!("it happened when we slumbered");
     }
diff --git a/src/test/bench/task-perf-spawnalot.rs b/src/test/bench/task-perf-spawnalot.rs
index 7e2c6fcf0ec..488a5ec9eda 100644
--- a/src/test/bench/task-perf-spawnalot.rs
+++ b/src/test/bench/task-perf-spawnalot.rs
@@ -9,14 +9,13 @@
 // except according to those terms.
 
 use std::os;
-use std::task;
 use std::uint;
-use std::str::from_str;
+use std::thread::Thread;
 
 fn f(n: uint) {
     let mut i = 0u;
     while i < n {
-        task::try(move|| g());
+        let _ = Thread::spawn(move|| g()).join();
         i += 1u;
     }
 }
@@ -32,7 +31,7 @@ fn main() {
     } else {
         args.into_iter().collect()
     };
-    let n = from_str::<uint>(args[1].as_slice()).unwrap();
+    let n = args[1].parse().unwrap();
     let mut i = 0u;
-    while i < n { task::spawn(move|| f(n) ); i += 1u; }
+    while i < n { Thread::spawn(move|| f(n) ).detach(); i += 1u; }
 }
diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs
deleted file mode 100644
index 32e0bff1991..00000000000
--- a/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-stage1
-
-#![feature(phase)]
-
-extern crate regex;
-#[phase(plugin)] extern crate regex_macros;
-
-// Tests to make sure that `regex!` will produce a compile error when given
-// an invalid regular expression.
-// More exhaustive failure tests for the parser are done with the traditional
-// unit testing infrastructure, since both dynamic and native regexes use the
-// same parser.
-
-fn main() {
-    let _ = regex!("("); //~ ERROR Regex syntax error
-}
diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs
deleted file mode 100644
index 8f83c9ec94f..00000000000
--- a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-stage1
-
-#![feature(phase)]
-
-extern crate regex;
-#[phase(plugin)] extern crate regex_macros;
-
-#[deny(unused_variables)]
-#[deny(dead_code)]
-#[allow(non_upper_case_globals)]
-
-// Tests to make sure that extraneous dead code warnings aren't emitted from
-// the code generated by regex!.
-//
-// The warning used for `static` items seems to be dead_code, which is why this
-// is a distinct test from using a normal let binding (which generates an
-// unused variable warning).
-
-fn main() {
-    static fubar: regex::Regex = regex!("abc"); //~ ERROR static item is never used: `fubar`
-}
diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs
deleted file mode 100644
index b4dda05f42d..00000000000
--- a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-stage1
-
-#![feature(phase)]
-
-extern crate regex;
-#[phase(plugin)] extern crate regex_macros;
-
-#[deny(unused_variables)]
-#[deny(dead_code)]
-
-// Tests to make sure that extraneous dead code warnings aren't emitted from
-// the code generated by regex!.
-
-fn main() {
-    let fubar = regex!("abc"); //~ ERROR unused variable: `fubar`
-}
diff --git a/src/test/compile-fail/atomicoption-not-send-ref.rs b/src/test/compile-fail/atomicoption-not-send-ref.rs
deleted file mode 100644
index 15c726be2fd..00000000000
--- a/src/test/compile-fail/atomicoption-not-send-ref.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::sync::atomic::AtomicOption;
-
-fn main() {
-    let x = 0u;
-    AtomicOption::new(box &x);  //~ ERROR `x` does not live long enough
-}
diff --git a/src/test/compile-fail/atomicoption-not-send.rs b/src/test/compile-fail/atomicoption-not-send.rs
deleted file mode 100644
index df3ebf530df..00000000000
--- a/src/test/compile-fail/atomicoption-not-send.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::kinds::marker;
-use std::sync::atomic::AtomicOption;
-
-fn main() {
-    AtomicOption::new(box marker::NoSend);  //~ ERROR `core::kinds::Send` is not implemented
-}
diff --git a/src/test/compile-fail/borrowck-for-loop-head-linkage.rs b/src/test/compile-fail/borrowck-for-loop-head-linkage.rs
index d7128105892..cb673f9be34 100644
--- a/src/test/compile-fail/borrowck-for-loop-head-linkage.rs
+++ b/src/test/compile-fail/borrowck-for-loop-head-linkage.rs
@@ -8,11 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::iter::repeat;
+
 fn main() {
     let mut vector = vec![1u, 2];
     for &x in vector.iter() {
         let cap = vector.capacity();
-        vector.grow(cap, 0u);      //~ ERROR cannot borrow
+        vector.extend(repeat(0));      //~ ERROR cannot borrow
         vector[1u] = 5u;   //~ ERROR cannot borrow
     }
 }
diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
index cecb8a09c66..9bd2d48b29a 100644
--- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
+++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn borrow(v: &int, f: |x: &int|) {
     f(v);
@@ -17,7 +17,7 @@ fn borrow(v: &int, f: |x: &int|) {
 fn box_imm() {
     let v = box 3i;
     let _w = &v;
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         println!("v={}", *v);
         //~^ ERROR cannot move `v` into closure
     });
@@ -26,7 +26,7 @@ fn box_imm() {
 fn box_imm_explicit() {
     let v = box 3i;
     let _w = &v;
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         println!("v={}", *v);
         //~^ ERROR cannot move
     });
diff --git a/src/test/compile-fail/borrowck-multiple-captures.rs b/src/test/compile-fail/borrowck-multiple-captures.rs
index a9c368fb052..2a26ff7d4a1 100644
--- a/src/test/compile-fail/borrowck-multiple-captures.rs
+++ b/src/test/compile-fail/borrowck-multiple-captures.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn borrow<T>(_: &T) { }
 
@@ -17,7 +17,7 @@ fn different_vars_after_borrows() {
     let p1 = &x1;
     let x2 = box 2i;
     let p2 = &x2;
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed
         drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed
     });
@@ -30,7 +30,7 @@ fn different_vars_after_moves() {
     drop(x1);
     let x2 = box 2i;
     drop(x2);
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         drop(x1); //~ ERROR capture of moved value: `x1`
         drop(x2); //~ ERROR capture of moved value: `x2`
     });
@@ -39,7 +39,7 @@ fn different_vars_after_moves() {
 fn same_var_after_borrow() {
     let x = box 1i;
     let p = &x;
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         drop(x); //~ ERROR cannot move `x` into closure because it is borrowed
         drop(x); //~ ERROR use of moved value: `x`
     });
@@ -49,7 +49,7 @@ fn same_var_after_borrow() {
 fn same_var_after_move() {
     let x = box 1i;
     drop(x);
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         drop(x); //~ ERROR capture of moved value: `x`
         drop(x); //~ ERROR use of moved value: `x`
     });
diff --git a/src/test/compile-fail/deriving-span-Zero-struct.rs b/src/test/compile-fail/deriving-span-Zero-struct.rs
deleted file mode 100644
index 6b09c365235..00000000000
--- a/src/test/compile-fail/deriving-span-Zero-struct.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
-
-extern crate rand;
-
-
-struct Error;
-
-#[derive(Zero)]   //~ ERROR not implemented
-struct Struct {
-    x: Error
-}
-
-fn main() {}
diff --git a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs b/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs
deleted file mode 100644
index c11af72f5c9..00000000000
--- a/src/test/compile-fail/deriving-span-Zero-tuple-struct.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
-
-extern crate rand;
-
-
-struct Error;
-
-#[derive(Zero)]   //~ ERROR not implemented
-struct Struct(
-    Error
-);
-
-fn main() {}
diff --git a/src/test/compile-fail/future_not_copyable.rs b/src/test/compile-fail/future_not_copyable.rs
index da56792ec88..6a5bde365b4 100644
--- a/src/test/compile-fail/future_not_copyable.rs
+++ b/src/test/compile-fail/future_not_copyable.rs
@@ -13,5 +13,5 @@ use std::sync::Future;
 fn main() {
     let f = Future::from_value(());
     let g = f;
-    f.unwrap(); //~ ERROR use of moved value
+    f.into_inner(); //~ ERROR use of moved value
 }
diff --git a/src/test/compile-fail/hashmap-lifetimes.rs b/src/test/compile-fail/hashmap-lifetimes.rs
index 5bd6c73df1a..edd57477d76 100644
--- a/src/test/compile-fail/hashmap-lifetimes.rs
+++ b/src/test/compile-fail/hashmap-lifetimes.rs
@@ -13,5 +13,5 @@ fn main() {
     my_stuff.insert(0i, 42i);
 
     let mut it = my_stuff.iter();
-    my_stuff.swap(1, 43); //~ ERROR cannot borrow
+    my_stuff.insert(1, 43); //~ ERROR cannot borrow
 }
diff --git a/src/test/compile-fail/issue-11374.rs b/src/test/compile-fail/issue-11374.rs
index 9705994550b..6b048528a99 100644
--- a/src/test/compile-fail/issue-11374.rs
+++ b/src/test/compile-fail/issue-11374.rs
@@ -32,6 +32,6 @@ pub fn for_stdin<'a>() -> Container<'a> {
 
 fn main() {
     let mut c = for_stdin();
-    let mut v = vec::Vec::from_elem(10, 0u8);
+    let mut v = Vec::new();
     c.read_to(v.as_mut_slice());
 }
diff --git a/src/test/compile-fail/issue-15783.rs b/src/test/compile-fail/issue-15783.rs
index 32a920baa31..f3e7a65db48 100644
--- a/src/test/compile-fail/issue-15783.rs
+++ b/src/test/compile-fail/issue-15783.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 pub fn foo(params: Option<&[&str]>) -> uint {
-    params.unwrap().head().unwrap().len()
+    params.unwrap().first().unwrap().len()
 }
 
 fn main() {
diff --git a/src/test/compile-fail/issue-17728.rs b/src/test/compile-fail/issue-17728.rs
index 96f252967a8..ac2eb735637 100644
--- a/src/test/compile-fail/issue-17728.rs
+++ b/src/test/compile-fail/issue-17728.rs
@@ -20,7 +20,7 @@ trait HasInventory {
 trait TraversesWorld {
     fn attemptTraverse(&self, room: &Room, directionStr: &str) -> Result<&Room, &str> {
         let direction = str_to_direction(directionStr);
-        let maybe_room = room.direction_to_room.find(&direction);
+        let maybe_room = room.direction_to_room.get(&direction);
         //~^ ERROR cannot infer an appropriate lifetime for autoref due to conflicting requirements
         match maybe_room {
             Some(entry) => Ok(entry),
diff --git a/src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs b/src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs
index 458e2aaf451..dc90994fcc1 100644
--- a/src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs
+++ b/src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn main() {
     let x = "Hello world!".to_string();
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         println!("{}", x);
     });
     println!("{}", x); //~ ERROR use of moved value
diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs
index affe979268d..9a09448ff01 100644
--- a/src/test/compile-fail/no-capture-arc.rs
+++ b/src/test/compile-fail/no-capture-arc.rs
@@ -11,13 +11,13 @@
 // error-pattern: use of moved value
 
 use std::sync::Arc;
-use std::task;
+use std::thread::Thread;
 
 fn main() {
     let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10);
     let arc_v = Arc::new(v);
 
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         assert_eq!((*arc_v)[3], 4);
     });
 
diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs
index 60982a84b79..de230743685 100644
--- a/src/test/compile-fail/no-reuse-move-arc.rs
+++ b/src/test/compile-fail/no-reuse-move-arc.rs
@@ -9,13 +9,13 @@
 // except according to those terms.
 
 use std::sync::Arc;
-use std::task;
+use std::thread::Thread;
 
 fn main() {
     let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10);
     let arc_v = Arc::new(v);
 
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         assert_eq!((*arc_v)[3], 4);
     });
 
diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs
index f487ecf9f45..9e56b27a05b 100644
--- a/src/test/compile-fail/no-send-res-ports.rs
+++ b/src/test/compile-fail/no-send-res-ports.rs
@@ -10,7 +10,7 @@
 
 #![feature(unsafe_destructor)]
 
-use std::task;
+use std::thread::Thread;
 use std::rc::Rc;
 
 #[derive(Show)]
@@ -35,7 +35,7 @@ fn main() {
 
     let x = foo(Port(Rc::new(())));
 
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         //~^ ERROR `core::kinds::Send` is not implemented
         //~^^ ERROR `core::kinds::Send` is not implemented
         let y = x;
diff --git a/src/test/compile-fail/spawn-non-nil-fn.rs b/src/test/compile-fail/spawn-non-nil-fn.rs
deleted file mode 100644
index 6cc45090b90..00000000000
--- a/src/test/compile-fail/spawn-non-nil-fn.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::task;
-
-fn main() {
-    // We get an error because return type is `->int` and not `->()`.
-    task::spawn(|| -> int { 10 });
-    //~^ ERROR type mismatch
-}
diff --git a/src/test/compile-fail/std-uncopyable-atomics.rs b/src/test/compile-fail/std-uncopyable-atomics.rs
index 501187ca9e5..a97a3e61678 100644
--- a/src/test/compile-fail/std-uncopyable-atomics.rs
+++ b/src/test/compile-fail/std-uncopyable-atomics.rs
@@ -24,6 +24,4 @@ fn main() {
     let x = *&x; //~ ERROR: cannot move out of dereference
     let x: AtomicPtr<uint> = AtomicPtr::new(ptr::null_mut());
     let x = *&x; //~ ERROR: cannot move out of dereference
-    let x: AtomicOption<uint> = AtomicOption::empty();
-    let x = *&x; //~ ERROR: cannot move out of dereference
 }
diff --git a/src/test/run-fail/rt-set-exit-status-panic2.rs b/src/test/run-fail/rt-set-exit-status-panic2.rs
index 58de34e92a0..972c85e376e 100644
--- a/src/test/run-fail/rt-set-exit-status-panic2.rs
+++ b/src/test/run-fail/rt-set-exit-status-panic2.rs
@@ -13,7 +13,7 @@
 #![feature(phase)]
 #[phase(plugin, link)] extern crate log;
 use std::os;
-use std::task;
+use std::thread::Thread;
 
 struct r {
   x:int,
@@ -36,7 +36,7 @@ fn r(x:int) -> r {
 
 fn main() {
     error!("whatever");
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
       let _i = r(5);
     });
     panic!();
diff --git a/src/test/run-fail/task-spawn-barefn.rs b/src/test/run-fail/task-spawn-barefn.rs
index dfc3238662c..8aade641630 100644
--- a/src/test/run-fail/task-spawn-barefn.rs
+++ b/src/test/run-fail/task-spawn-barefn.rs
@@ -10,12 +10,12 @@
 
 // error-pattern:Ensure that the child task runs by panicking
 
-use std::task;
+use std::thread::Thread;
 
 fn main() {
     // the purpose of this test is to make sure that task::spawn()
     // works when provided with a bare function:
-    let r = task::try(startfn);
+    let r = Thread::spawn(startfn).join();
     if r.is_err() {
         panic!()
     }
diff --git a/src/test/run-make/lto-syntax-extension/main.rs b/src/test/run-make/lto-syntax-extension/main.rs
index 0f6bd10b15d..2028710cbd2 100644
--- a/src/test/run-make/lto-syntax-extension/main.rs
+++ b/src/test/run-make/lto-syntax-extension/main.rs
@@ -11,9 +11,6 @@
 #![feature(phase)]
 
 extern crate lib;
-extern crate regex;
-#[phase(plugin)] extern crate regex_macros;
+#[phase(plugin, link)] extern crate log;
 
-fn main() {
-    regex!("1234");
-}
+fn main() {}
diff --git a/src/test/run-make/static-unwinding/main.rs b/src/test/run-make/static-unwinding/main.rs
index e2cca4d11f9..faac858e76e 100644
--- a/src/test/run-make/static-unwinding/main.rs
+++ b/src/test/run-make/static-unwinding/main.rs
@@ -10,7 +10,7 @@
 
 extern crate lib;
 
-use std::task;
+use std::thread::Thread;
 
 static mut statik: int = 0;
 
@@ -22,11 +22,11 @@ impl Drop for A {
 }
 
 fn main() {
-    task::try(move|| {
+    Thread::spawn(move|| {
         let _a = A;
         lib::callback(|| panic!());
         1i
-    });
+    }).join().err().unwrap();
 
     unsafe {
         assert!(lib::statik == 1);
diff --git a/src/test/run-make/unicode-input/span_length.rs b/src/test/run-make/unicode-input/span_length.rs
index f83734b1502..ae638399450 100644
--- a/src/test/run-make/unicode-input/span_length.rs
+++ b/src/test/run-make/unicode-input/span_length.rs
@@ -8,9 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::{char, os};
 use std::io::{File, Command};
+use std::iter::repeat;
 use std::rand::{thread_rng, Rng};
+use std::{char, os};
 
 // creates a file with `fn main() { <random ident> }` and checks the
 // compiler emits a span of the appropriate length (for the
@@ -60,7 +61,8 @@ fn main() {
         let err = String::from_utf8_lossy(result.error.as_slice());
 
         // the span should end the line (e.g no extra ~'s)
-        let expected_span = format!("^{}\n", "~".repeat(n - 1));
+        let expected_span = format!("^{}\n", repeat("~").take(n - 1)
+                                                        .collect::<String>());
         assert!(err.as_slice().contains(expected_span.as_slice()));
     }
 }
diff --git a/src/test/run-pass/child-outlives-parent.rs b/src/test/run-pass/child-outlives-parent.rs
index bdd92919ef0..39af96a58e6 100644
--- a/src/test/run-pass/child-outlives-parent.rs
+++ b/src/test/run-pass/child-outlives-parent.rs
@@ -10,10 +10,10 @@
 
 // Reported as issue #126, child leaks the string.
 
-use std::task;
+use std::thread::Thread;
 
 fn child2(_s: String) { }
 
 pub fn main() {
-    let _x = task::spawn(move|| child2("hi".to_string()));
+    let _x = Thread::spawn(move|| child2("hi".to_string()));
 }
diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs
index d3c703b258f..cb495859708 100644
--- a/src/test/run-pass/clone-with-exterior.rs
+++ b/src/test/run-pass/clone-with-exterior.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task::spawn;
+use std::thread::Thread;
 
 struct Pair {
     a: int,
@@ -18,7 +18,7 @@ struct Pair {
 pub fn main() {
     let z = box Pair { a : 10, b : 12};
 
-    spawn(move|| {
+    let _t = Thread::spawn(move|| {
         assert_eq!(z.a, 10);
         assert_eq!(z.b, 12);
     });
diff --git a/src/test/run-pass/comm.rs b/src/test/run-pass/comm.rs
index 5cfc692aae4..16a21adc3fc 100644
--- a/src/test/run-pass/comm.rs
+++ b/src/test/run-pass/comm.rs
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _t = task::spawn(move|| { child(&tx) });
+    let _t = Thread::spawn(move|| { child(&tx) });
     let y = rx.recv().unwrap();
     println!("received");
     println!("{}", y);
diff --git a/src/test/run-pass/const-str-ptr.rs b/src/test/run-pass/const-str-ptr.rs
index e0e8ca5618e..5e028d3774f 100644
--- a/src/test/run-pass/const-str-ptr.rs
+++ b/src/test/run-pass/const-str-ptr.rs
@@ -18,13 +18,13 @@ const C: *const u8 = B as *const u8;
 pub fn main() {
     unsafe {
         let foo = &A as *const u8;
-        assert_eq!(str::raw::from_utf8(&A), "hi");
-        assert_eq!(string::raw::from_buf_len(foo, A.len()), "hi".to_string());
-        assert_eq!(string::raw::from_buf_len(C, B.len()), "hi".to_string());
+        assert_eq!(str::from_utf8_unchecked(&A), "hi");
+        assert_eq!(String::from_raw_buf_len(foo, A.len()), "hi".to_string());
+        assert_eq!(String::from_raw_buf_len(C, B.len()), "hi".to_string());
         assert!(*C == A[0]);
         assert!(*(&B[0] as *const u8) == A[0]);
 
-        let bar = str::raw::from_utf8(&A).to_c_str();
+        let bar = str::from_utf8_unchecked(&A).to_c_str();
         assert_eq!(bar.as_str(), "hi".to_c_str().as_str());
     }
 }
diff --git a/src/test/run-pass/deriving-zero.rs b/src/test/run-pass/deriving-zero.rs
deleted file mode 100644
index 442c330b277..00000000000
--- a/src/test/run-pass/deriving-zero.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(associated_types)]
-
-use std::num::Zero;
-use std::ops::Add;
-
-#[derive(Zero)]
-struct Vector2<T>(T, T);
-
-impl<T: Add<Output=T>> Add for Vector2<T> {
-    type Output = Vector2<T>;
-
-    fn add(self, other: Vector2<T>) -> Vector2<T> {
-        match (self, other) {
-            (Vector2(x0, y0), Vector2(x1, y1)) => {
-                Vector2(x0 + x1, y0 + y1)
-            }
-        }
-    }
-}
-
-#[derive(Zero)]
-struct Vector3<T> {
-    x: T, y: T, z: T,
-}
-
-impl<T: Add<Output=T>> Add for Vector3<T> {
-    type Output = Vector3<T>;
-
-    fn add(self, other: Vector3<T>) -> Vector3<T> {
-        Vector3 {
-            x: self.x + other.x,
-            y: self.y + other.y,
-            z: self.z + other.z,
-        }
-    }
-}
-
-#[derive(Zero)]
-struct Matrix3x2<T> {
-    x: Vector2<T>,
-    y: Vector2<T>,
-    z: Vector2<T>,
-}
-
-impl<T: Add<Output=T>> Add for Matrix3x2<T> {
-    type Output = Matrix3x2<T>;
-
-    fn add(self, other: Matrix3x2<T>) -> Matrix3x2<T> {
-        Matrix3x2 {
-            x: self.x + other.x,
-            y: self.y + other.y,
-            z: self.z + other.z,
-        }
-    }
-}
-
-pub fn main() {
-    let _: Vector2<int> = Zero::zero();
-    let _: Vector3<f64> = Zero::zero();
-    let _: Matrix3x2<u8> = Zero::zero();
-}
diff --git a/src/test/run-pass/drop-trait-enum.rs b/src/test/run-pass/drop-trait-enum.rs
index 381404d2e21..f1cc4fb1724 100644
--- a/src/test/run-pass/drop-trait-enum.rs
+++ b/src/test/run-pass/drop-trait-enum.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 #[derive(PartialEq, Show)]
@@ -66,23 +66,23 @@ pub fn main() {
     assert_eq!(receiver.recv().ok(), None);
 
     let (sender, receiver) = channel();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let v = Foo::FailingVariant { on_drop: SendOnDrop { sender: sender } };
     });
     assert_eq!(receiver.recv().unwrap(), Message::Dropped);
     assert_eq!(receiver.recv().ok(), None);
 
     let (sender, receiver) = channel();
-    {
-        task::spawn(move|| {
+    let _t = {
+        Thread::spawn(move|| {
             let mut v = Foo::NestedVariant(box 42u, SendOnDrop {
                 sender: sender.clone()
             }, sender.clone());
             v = Foo::NestedVariant(box 42u, SendOnDrop { sender: sender.clone() }, sender.clone());
             v = Foo::SimpleVariant(sender.clone());
             v = Foo::FailingVariant { on_drop: SendOnDrop { sender: sender } };
-        });
-    }
+        })
+    };
     assert_eq!(receiver.recv().unwrap(), Message::DestructorRan);
     assert_eq!(receiver.recv().unwrap(), Message::Dropped);
     assert_eq!(receiver.recv().unwrap(), Message::DestructorRan);
diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs
index aed1392c8b6..3c4c1da52ea 100644
--- a/src/test/run-pass/extern-call-deep2.rs
+++ b/src/test/run-pass/extern-call-deep2.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 extern crate libc;
-use std::task;
+use std::thread::Thread;
 
 mod rustrt {
     extern crate libc;
@@ -40,7 +40,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 pub fn main() {
     // Make sure we're on a task with small Rust stacks (main currently
     // has a large stack)
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let result = count(1000);
         println!("result = {}", result);
         assert_eq!(result, 1000);
diff --git a/src/test/run-pass/extern-call-scrub.rs b/src/test/run-pass/extern-call-scrub.rs
index 3f5faabe595..0dca7514dc5 100644
--- a/src/test/run-pass/extern-call-scrub.rs
+++ b/src/test/run-pass/extern-call-scrub.rs
@@ -13,7 +13,7 @@
 // directions
 
 extern crate libc;
-use std::task;
+use std::thread::Thread;
 
 mod rustrt {
     extern crate libc;
@@ -44,7 +44,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 pub fn main() {
     // Make sure we're on a task with small Rust stacks (main currently
     // has a large stack)
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let result = count(12);
         println!("result = {}", result);
         assert_eq!(result, 2048);
diff --git a/src/test/run-pass/extern-stress.rs b/src/test/run-pass/extern-stress.rs
index 8b080712b96..bb9e9407382 100644
--- a/src/test/run-pass/extern-stress.rs
+++ b/src/test/run-pass/extern-stress.rs
@@ -12,7 +12,7 @@
 // while holding onto C stacks
 
 extern crate libc;
-use std::task;
+use std::thread::Thread;
 
 mod rustrt {
     extern crate libc;
@@ -29,7 +29,7 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t {
     if data == 1 {
         data
     } else {
-        task::deschedule();
+        Thread::yield_now();
         count(data - 1) + count(data - 1)
     }
 }
@@ -41,9 +41,9 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 }
 
 pub fn main() {
-    for _ in range(0u, 100) {
-        task::spawn(move|| {
+    range(0u, 100).map(|_| {
+        Thread::spawn(move|| {
             assert_eq!(count(5), 16);
-        });
-    }
+        })
+    }).collect::<Vec<_>>();
 }
diff --git a/src/test/run-pass/extern-yield.rs b/src/test/run-pass/extern-yield.rs
index 1c89d8ae1ce..46829e9ba6e 100644
--- a/src/test/run-pass/extern-yield.rs
+++ b/src/test/run-pass/extern-yield.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 extern crate libc;
-use std::task;
+use std::thread::Thread;
 
 mod rustrt {
     extern crate libc;
@@ -32,17 +32,17 @@ extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t {
 
 fn count(n: libc::uintptr_t) -> libc::uintptr_t {
     unsafe {
-        task::deschedule();
+        Thread::yield_now();
         rustrt::rust_dbg_call(cb, n)
     }
 }
 
 pub fn main() {
-    for _ in range(0, 10u) {
-        task::spawn(move|| {
+    range(0, 10u).map(|i| {
+        Thread::spawn(move|| {
             let result = count(5);
             println!("result = {}", result);
             assert_eq!(result, 16);
-        });
-    }
+        })
+    }).collect::<Vec<_>>();
 }
diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs
index 162d7f10255..7fd8ca1fd8a 100644
--- a/src/test/run-pass/hashmap-memory.rs
+++ b/src/test/run-pass/hashmap-memory.rs
@@ -23,7 +23,7 @@ mod map_reduce {
     use std::collections::HashMap;
     use std::sync::mpsc::{channel, Sender};
     use std::str;
-    use std::task;
+    use std::thread::Thread;
 
     pub type putter<'a> = |String, String|: 'a;
 
@@ -35,7 +35,7 @@ mod map_reduce {
         for i in inputs.iter() {
             let ctrl = ctrl.clone();
             let i = i.clone();
-            task::spawn(move|| map_task(ctrl.clone(), i.clone()) );
+            Thread::spawn(move|| map_task(ctrl.clone(), i.clone()) ).detach();
         }
     }
 
diff --git a/src/test/run-pass/issue-13323.rs b/src/test/run-pass/issue-13323.rs
index d9149b0d746..b7cd8a90112 100644
--- a/src/test/run-pass/issue-13323.rs
+++ b/src/test/run-pass/issue-13323.rs
@@ -14,7 +14,7 @@ struct StrWrap {
 
 impl StrWrap {
     fn new(s: &str) -> StrWrap {
-        StrWrap { s: s.into_string() }
+        StrWrap { s: s.to_string() }
     }
 
     fn get_s<'a>(&'a self) -> &'a str {
diff --git a/src/test/run-pass/issue-15149.rs b/src/test/run-pass/issue-15149.rs
index 1fb17d4d5fa..57dc6fd75f0 100644
--- a/src/test/run-pass/issue-15149.rs
+++ b/src/test/run-pass/issue-15149.rs
@@ -10,7 +10,6 @@
 
 use std::io::{TempDir, Command, fs};
 use std::os;
-use std::task::TaskBuilder;
 
 fn main() {
     // If we're the child, make sure we were invoked correctly
diff --git a/src/test/run-pass/issue-17718.rs b/src/test/run-pass/issue-17718.rs
index 10ad0f620e9..44cf0dd8b8e 100644
--- a/src/test/run-pass/issue-17718.rs
+++ b/src/test/run-pass/issue-17718.rs
@@ -12,10 +12,10 @@
 
 extern crate "issue-17718" as other;
 
-use std::sync::atomic;
+use std::sync::atomic::{AtomicUint, ATOMIC_UINT_INIT, Ordering};
 
 const C1: uint = 1;
-const C2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
+const C2: AtomicUint = ATOMIC_UINT_INIT;
 const C3: fn() = foo;
 const C4: uint = C1 * C1 + C1 / C1;
 const C5: &'static uint = &C4;
@@ -25,7 +25,7 @@ const C6: uint = {
 };
 
 static S1: uint = 3;
-static S2: atomic::AtomicUint = atomic::ATOMIC_UINT_INIT;
+static S2: AtomicUint = ATOMIC_UINT_INIT;
 
 mod test {
     static A: uint = 4;
@@ -38,14 +38,14 @@ fn foo() {}
 fn main() {
     assert_eq!(C1, 1);
     assert_eq!(C3(), ());
-    assert_eq!(C2.fetch_add(1, atomic::SeqCst), 0);
-    assert_eq!(C2.fetch_add(1, atomic::SeqCst), 0);
+    assert_eq!(C2.fetch_add(1, Ordering::SeqCst), 0);
+    assert_eq!(C2.fetch_add(1, Ordering::SeqCst), 0);
     assert_eq!(C4, 2);
     assert_eq!(*C5, 2);
     assert_eq!(C6, 3);
     assert_eq!(S1, 3);
-    assert_eq!(S2.fetch_add(1, atomic::SeqCst), 0);
-    assert_eq!(S2.fetch_add(1, atomic::SeqCst), 1);
+    assert_eq!(S2.fetch_add(1, Ordering::SeqCst), 0);
+    assert_eq!(S2.fetch_add(1, Ordering::SeqCst), 1);
 
     match 1 {
         C1 => {}
@@ -62,13 +62,13 @@ fn main() {
 
     assert_eq!(other::C1, 1);
     assert_eq!(other::C3(), ());
-    assert_eq!(other::C2.fetch_add(1, atomic::SeqCst), 0);
-    assert_eq!(other::C2.fetch_add(1, atomic::SeqCst), 0);
+    assert_eq!(other::C2.fetch_add(1, Ordering::SeqCst), 0);
+    assert_eq!(other::C2.fetch_add(1, Ordering::SeqCst), 0);
     assert_eq!(other::C4, 2);
     assert_eq!(*other::C5, 2);
     assert_eq!(other::S1, 3);
-    assert_eq!(other::S2.fetch_add(1, atomic::SeqCst), 0);
-    assert_eq!(other::S2.fetch_add(1, atomic::SeqCst), 1);
+    assert_eq!(other::S2.fetch_add(1, Ordering::SeqCst), 0);
+    assert_eq!(other::S2.fetch_add(1, Ordering::SeqCst), 1);
 
     let _a = other::C1;
     let _a = other::C2;
diff --git a/src/test/run-pass/issue-2383.rs b/src/test/run-pass/issue-2383.rs
index 39995db5a2f..94bff890820 100644
--- a/src/test/run-pass/issue-2383.rs
+++ b/src/test/run-pass/issue-2383.rs
@@ -14,5 +14,5 @@ use std::collections::RingBuf;
 
 pub fn main() {
     let mut q = RingBuf::new();
-    q.push(10i);
+    q.push_front(10i);
 }
diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs
index 2a4ca5b4210..f4146063409 100644
--- a/src/test/run-pass/issue-2718.rs
+++ b/src/test/run-pass/issue-2718.rs
@@ -22,7 +22,7 @@ pub mod pipes {
     use std::mem::{forget, transmute};
     use std::mem::{replace, swap};
     use std::mem;
-    use std::task;
+    use std::thread::Thread;
     use std::kinds::Send;
 
     pub struct Stuff<T> {
@@ -116,7 +116,7 @@ pub mod pipes {
             let old_state = swap_state_acq(&mut (*p).state,
                                            blocked);
             match old_state {
-              empty | blocked => { task::deschedule(); }
+              empty | blocked => { Thread::yield_now(); }
               full => {
                 let payload = replace(&mut p.payload, None);
                 return Some(payload.unwrap())
diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs
index ab2d1d90093..25b933b8f96 100644
--- a/src/test/run-pass/issue-2804.rs
+++ b/src/test/run-pass/issue-2804.rs
@@ -23,7 +23,7 @@ enum object {
 
 fn lookup(table: json::Object, key: String, default: String) -> String
 {
-    match table.find(&key.to_string()) {
+    match table.get(&key) {
         option::Option::Some(&Json::String(ref s)) => {
             s.to_string()
         }
diff --git a/src/test/run-pass/issue-2989.rs b/src/test/run-pass/issue-2989.rs
index d625f6bcf92..bef082569b9 100644
--- a/src/test/run-pass/issue-2989.rs
+++ b/src/test/run-pass/issue-2989.rs
@@ -14,19 +14,19 @@ trait methods {
 
 impl methods for () {
     fn to_bytes(&self) -> Vec<u8> {
-        Vec::from_elem(0, 0u8)
+        Vec::new()
     }
 }
 
 // the position of this function is significant! - if it comes before methods
 // then it works, if it comes after it then it doesn't!
 fn to_bools(bitv: Storage) -> Vec<bool> {
-    Vec::from_fn(8, |i| {
+    range(0, 8).map(|i| {
         let w = i / 64;
         let b = i % 64;
         let x = 1u64 & (bitv.storage[w] >> b);
         x == 1u64
-    })
+    }).collect()
 }
 
 struct Storage { storage: Vec<u64> }
diff --git a/src/test/run-pass/issue-3563-3.rs b/src/test/run-pass/issue-3563-3.rs
index d04d8f92ac4..a3903128b65 100644
--- a/src/test/run-pass/issue-3563-3.rs
+++ b/src/test/run-pass/issue-3563-3.rs
@@ -8,20 +8,23 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ASCII art shape renderer.
-// Demonstrates traits, impls, operator overloading, non-copyable struct, unit testing.
-// To run execute: rustc --test shapes.rs && ./shapes
+// ASCII art shape renderer.  Demonstrates traits, impls, operator overloading,
+// non-copyable struct, unit testing.  To run execute: rustc --test shapes.rs &&
+// ./shapes
 
-// Rust's std library is tightly bound to the language itself so it is automatically linked in.
-// However the extra library is designed to be optional (for code that must run on constrained
-//  environments like embedded devices or special environments like kernel code) so it must
-// be explicitly linked in.
+// Rust's std library is tightly bound to the language itself so it is
+// automatically linked in.  However the extra library is designed to be
+// optional (for code that must run on constrained environments like embedded
+// devices or special environments like kernel code) so it must be explicitly
+// linked in.
 
-// Extern mod controls linkage. Use controls the visibility of names to modules that are
-// already linked in. Using WriterUtil allows us to use the write_line method.
+// Extern mod controls linkage. Use controls the visibility of names to modules
+// that are already linked in. Using WriterUtil allows us to use the write_line
+// method.
 
-use std::slice;
 use std::fmt;
+use std::iter::repeat;
+use std::slice;
 
 // Represents a position on a canvas.
 struct Point {
@@ -70,7 +73,7 @@ fn AsciiArt(width: uint, height: uint, fill: char) -> AsciiArt {
     // blank characters for each position in our canvas.
     let mut lines = Vec::new();
     for _ in range(0, height) {
-        lines.push(Vec::from_elem(width, '.'));
+        lines.push(repeat('.').take(width).collect::<Vec<_>>());
     }
 
     // Rust code often returns values by omitting the trailing semi-colon
@@ -105,7 +108,7 @@ impl fmt::Show for AsciiArt {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         // Convert each line into a string.
         let lines = self.lines.iter()
-                              .map(|line| String::from_chars(line.as_slice()))
+                              .map(|line| line.iter().cloned().collect())
                               .collect::<Vec<String>>();
 
         // Concatenate the lines together using a new-line.
diff --git a/src/test/run-pass/issue-3609.rs b/src/test/run-pass/issue-3609.rs
index a02dbb6035b..b89ee81a727 100644
--- a/src/test/run-pass/issue-3609.rs
+++ b/src/test/run-pass/issue-3609.rs
@@ -10,7 +10,7 @@
 
 #![feature(default_type_params)]
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::Sender;
 use std::thunk::Invoke;
 
@@ -23,7 +23,7 @@ enum Msg
 }
 
 fn foo(name: String, samples_chan: Sender<Msg>) {
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let mut samples_chan = samples_chan;
 
         // `box() (...)` syntax is needed to make pretty printer converge in one try:
diff --git a/src/test/run-pass/issue-8460.rs b/src/test/run-pass/issue-8460.rs
index b9b365e3e66..3d5e32972e7 100644
--- a/src/test/run-pass/issue-8460.rs
+++ b/src/test/run-pass/issue-8460.rs
@@ -9,27 +9,27 @@
 // except according to those terms.
 
 use std::{int, i8, i16, i32, i64};
-use std::task;
+use std::thread::Thread;
 
 fn main() {
-    assert!(task::try(move|| int::MIN / -1).is_err());
-    assert!(task::try(move|| i8::MIN / -1).is_err());
-    assert!(task::try(move|| i16::MIN / -1).is_err());
-    assert!(task::try(move|| i32::MIN / -1).is_err());
-    assert!(task::try(move|| i64::MIN / -1).is_err());
-    assert!(task::try(move|| 1i / 0).is_err());
-    assert!(task::try(move|| 1i8 / 0).is_err());
-    assert!(task::try(move|| 1i16 / 0).is_err());
-    assert!(task::try(move|| 1i32 / 0).is_err());
-    assert!(task::try(move|| 1i64 / 0).is_err());
-    assert!(task::try(move|| int::MIN % -1).is_err());
-    assert!(task::try(move|| i8::MIN % -1).is_err());
-    assert!(task::try(move|| i16::MIN % -1).is_err());
-    assert!(task::try(move|| i32::MIN % -1).is_err());
-    assert!(task::try(move|| i64::MIN % -1).is_err());
-    assert!(task::try(move|| 1i % 0).is_err());
-    assert!(task::try(move|| 1i8 % 0).is_err());
-    assert!(task::try(move|| 1i16 % 0).is_err());
-    assert!(task::try(move|| 1i32 % 0).is_err());
-    assert!(task::try(move|| 1i64 % 0).is_err());
+    assert!(Thread::spawn(move|| int::MIN / -1).join().is_err());
+    assert!(Thread::spawn(move|| i8::MIN / -1).join().is_err());
+    assert!(Thread::spawn(move|| i16::MIN / -1).join().is_err());
+    assert!(Thread::spawn(move|| i32::MIN / -1).join().is_err());
+    assert!(Thread::spawn(move|| i64::MIN / -1).join().is_err());
+    assert!(Thread::spawn(move|| 1i / 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i8 / 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i16 / 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i32 / 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i64 / 0).join().is_err());
+    assert!(Thread::spawn(move|| int::MIN % -1).join().is_err());
+    assert!(Thread::spawn(move|| i8::MIN % -1).join().is_err());
+    assert!(Thread::spawn(move|| i16::MIN % -1).join().is_err());
+    assert!(Thread::spawn(move|| i32::MIN % -1).join().is_err());
+    assert!(Thread::spawn(move|| i64::MIN % -1).join().is_err());
+    assert!(Thread::spawn(move|| 1i % 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i8 % 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i16 % 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i32 % 0).join().is_err());
+    assert!(Thread::spawn(move|| 1i64 % 0).join().is_err());
 }
diff --git a/src/test/run-pass/ivec-tag.rs b/src/test/run-pass/ivec-tag.rs
index a9a50b9ef25..dd38a5f8b3b 100644
--- a/src/test/run-pass/ivec-tag.rs
+++ b/src/test/run-pass/ivec-tag.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 fn producer(tx: &Sender<Vec<u8>>) {
@@ -19,7 +19,7 @@ fn producer(tx: &Sender<Vec<u8>>) {
 
 pub fn main() {
     let (tx, rx) = channel::<Vec<u8>>();
-    let _prod = task::spawn(move|| {
+    let _prod = Thread::spawn(move|| {
         producer(&tx)
     });
 
diff --git a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
index d745226af44..f2d509ee61d 100644
--- a/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
+++ b/src/test/run-pass/kindck-implicit-close-over-mut-var.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn user(_i: int) {}
 
@@ -16,7 +16,7 @@ fn foo() {
     // Here, i is *copied* into the proc (heap closure).
     // Requires allocation.  The proc's copy is not mutable.
     let mut i = 0;
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         user(i);
         println!("spawned {}", i)
     });
@@ -29,7 +29,7 @@ fn bar() {
     // mutable outside of the proc.
     let mut i = 0;
     while i < 10 {
-        task::spawn(move|| {
+        let _t = Thread::spawn(move|| {
             user(i);
         });
         i += 1;
@@ -40,7 +40,7 @@ fn car() {
     // Here, i must be shadowed in the proc to be mutable.
     let mut i = 0;
     while i < 10 {
-        task::spawn(move|| {
+        let _t = Thread::spawn(move|| {
             let mut i = i;
             i += 1;
             user(i);
diff --git a/src/test/run-pass/match-with-ret-arm.rs b/src/test/run-pass/match-with-ret-arm.rs
index 2cba1dec2dc..a1537e63e57 100644
--- a/src/test/run-pass/match-with-ret-arm.rs
+++ b/src/test/run-pass/match-with-ret-arm.rs
@@ -9,13 +9,12 @@
 // except according to those terms.
 
 use std::uint;
-use std::str::from_str;
 
 pub fn main() {
     // sometimes we have had trouble finding
     // the right type for f, as we unified
     // bot and u32 here
-    let f = match from_str::<uint>("1234") {
+    let f = match "1234".parse::<uint>() {
         None => return (),
         Some(num) => num as u32
     };
diff --git a/src/test/run-pass/mod-view-items.rs b/src/test/run-pass/mod-view-items.rs
index 2b23787dd0f..f03ec7b6f3e 100644
--- a/src/test/run-pass/mod-view-items.rs
+++ b/src/test/run-pass/mod-view-items.rs
@@ -16,7 +16,7 @@
 // begin failing.
 
 mod m {
-    pub fn f() -> Vec<int> { Vec::from_elem(1u, 0i) }
+    pub fn f() -> Vec<int> { Vec::new() }
 }
 
 pub fn main() { let _x = m::f(); }
diff --git a/src/test/run-pass/moves-based-on-type-capture-clause.rs b/src/test/run-pass/moves-based-on-type-capture-clause.rs
index e5694aefdf4..3596fa1a006 100644
--- a/src/test/run-pass/moves-based-on-type-capture-clause.rs
+++ b/src/test/run-pass/moves-based-on-type-capture-clause.rs
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
     let x = "Hello world!".to_string();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         println!("{}", x);
     });
 }
diff --git a/src/test/run-pass/no-landing-pads.rs b/src/test/run-pass/no-landing-pads.rs
index e8bf366df95..6b1553cd9f6 100644
--- a/src/test/run-pass/no-landing-pads.rs
+++ b/src/test/run-pass/no-landing-pads.rs
@@ -10,7 +10,7 @@
 
 // compile-flags: -Z no-landing-pads
 
-use std::task;
+use std::thread::Thread;
 
 static mut HIT: bool = false;
 
@@ -23,9 +23,9 @@ impl Drop for A {
 }
 
 fn main() {
-    task::try(move|| -> () {
+    Thread::spawn(move|| -> () {
         let _a = A;
         panic!();
-    });
+    }).join().unwrap_err();
     assert!(unsafe { !HIT });
 }
diff --git a/src/test/run-pass/panic-in-dtor-drops-fields.rs b/src/test/run-pass/panic-in-dtor-drops-fields.rs
index 39252d6b142..5c692bf8801 100644
--- a/src/test/run-pass/panic-in-dtor-drops-fields.rs
+++ b/src/test/run-pass/panic-in-dtor-drops-fields.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 static mut dropped: bool = false;
 
@@ -33,9 +33,9 @@ impl Drop for B {
 }
 
 pub fn main() {
-    let ret = task::try(move|| {
+    let ret = Thread::spawn(move|| {
         let _a = A { b: B { foo: 3 } };
-    });
+    }).join();
     assert!(ret.is_err());
     unsafe { assert!(dropped); }
 }
diff --git a/src/test/run-pass/realloc-16687.rs b/src/test/run-pass/realloc-16687.rs
index a29ed712d40..80ee735be70 100644
--- a/src/test/run-pass/realloc-16687.rs
+++ b/src/test/run-pass/realloc-16687.rs
@@ -17,6 +17,7 @@ extern crate alloc;
 
 use alloc::heap;
 use std::ptr;
+use std::iter::repeat;
 
 fn main() {
     unsafe {
@@ -26,7 +27,7 @@ fn main() {
 
 unsafe fn test_triangle() -> bool {
     static COUNT : uint = 16;
-    let mut ascend = Vec::from_elem(COUNT, ptr::null_mut());
+    let mut ascend = repeat(ptr::null_mut()).take(COUNT).collect::<Vec<_>>();
     let ascend = ascend.as_mut_slice();
     static ALIGN : uint = 1;
 
diff --git a/src/test/run-pass/running-with-no-runtime.rs b/src/test/run-pass/running-with-no-runtime.rs
index 0aeade935da..fc53737bb44 100644
--- a/src/test/run-pass/running-with-no-runtime.rs
+++ b/src/test/run-pass/running-with-no-runtime.rs
@@ -33,9 +33,9 @@ fn start(argc: int, argv: *const *const u8) -> int {
     }
 
     let args = unsafe {
-        Vec::from_fn(argc as uint, |i| {
+        range(0, argc as uint).map(|i| {
             String::from_raw_buf(*argv.offset(i as int)).into_bytes()
-        })
+        }).collect::<Vec<_>>()
     };
     let me = args[0].as_slice();
 
diff --git a/src/test/run-pass/send-resource.rs b/src/test/run-pass/send-resource.rs
index 7fd9706bd0f..a920d76e7ca 100644
--- a/src/test/run-pass/send-resource.rs
+++ b/src/test/run-pass/send-resource.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::channel;
 
 struct test {
@@ -28,7 +28,7 @@ fn test(f: int) -> test {
 pub fn main() {
     let (tx, rx) = channel();
 
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let (tx2, rx2) = channel();
         tx.send(tx2).unwrap();
 
diff --git a/src/test/run-pass/send_str_hashmap.rs b/src/test/run-pass/send_str_hashmap.rs
index bfeff58b802..c58654670d1 100644
--- a/src/test/run-pass/send_str_hashmap.rs
+++ b/src/test/run-pass/send_str_hashmap.rs
@@ -11,8 +11,9 @@
 extern crate collections;
 
 use std::collections::HashMap;
-use std::str::SendStr;
-use std::borrow::IntoCow;
+use std::borrow::{Cow, IntoCow};
+
+type SendStr = Cow<'static, String, str>;
 
 pub fn main() {
     let mut map: HashMap<SendStr, uint> = HashMap::new();
diff --git a/src/test/run-pass/send_str_treemap.rs b/src/test/run-pass/send_str_treemap.rs
index 8c70738de48..438724a2b06 100644
--- a/src/test/run-pass/send_str_treemap.rs
+++ b/src/test/run-pass/send_str_treemap.rs
@@ -11,8 +11,9 @@
 extern crate collections;
 
 use self::collections::BTreeMap;
-use std::str::SendStr;
-use std::borrow::IntoCow;
+use std::borrow::{Cow, IntoCow};
+
+type SendStr = Cow<'static, String, str>;
 
 pub fn main() {
     let mut map: BTreeMap<SendStr, uint> = BTreeMap::new();
diff --git a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
index 838c627040d..3ed835dc5bd 100644
--- a/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
+++ b/src/test/run-pass/sendfn-spawn-with-fn-arg.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() { test05(); }
 
@@ -22,7 +22,7 @@ fn test05() {
         println!("{}", *three + n); // will copy x into the closure
         assert_eq!(*three, 3);
     };
-    task::spawn(move|| {
+    Thread::spawn(move|| {
         test05_start(fn_to_send);
-    });
+    }).join().ok().unwrap();
 }
diff --git a/src/test/run-pass/sepcomp-unwind.rs b/src/test/run-pass/sepcomp-unwind.rs
index ccebfa72384..246957a4f46 100644
--- a/src/test/run-pass/sepcomp-unwind.rs
+++ b/src/test/run-pass/sepcomp-unwind.rs
@@ -19,6 +19,8 @@
 // In any case, this test should let us know if enabling parallel codegen ever
 // breaks unwinding.
 
+use std::thread::Thread;
+
 fn pad() -> uint { 0 }
 
 mod a {
@@ -34,5 +36,5 @@ mod b {
 }
 
 fn main() {
-    std::task::try(move|| { ::b::g() }).unwrap_err();
+    Thread::spawn(move|| { ::b::g() }).join().unwrap_err();
 }
diff --git a/src/test/run-pass/slice-panic-1.rs b/src/test/run-pass/slice-panic-1.rs
index b66641affc9..13f2971871b 100644
--- a/src/test/run-pass/slice-panic-1.rs
+++ b/src/test/run-pass/slice-panic-1.rs
@@ -12,7 +12,7 @@
 
 #![feature(slicing_syntax)]
 
-use std::task;
+use std::thread::Thread;
 
 struct Foo;
 
@@ -28,6 +28,6 @@ fn foo() {
 }
 
 fn main() {
-    let _ = task::try(move|| foo());
+    let _ = Thread::spawn(move|| foo()).join();
     unsafe { assert!(DTOR_COUNT == 2); }
 }
diff --git a/src/test/run-pass/slice-panic-2.rs b/src/test/run-pass/slice-panic-2.rs
index f7e241554c1..ccbb33d7768 100644
--- a/src/test/run-pass/slice-panic-2.rs
+++ b/src/test/run-pass/slice-panic-2.rs
@@ -12,7 +12,7 @@
 
 #![feature(slicing_syntax)]
 
-use std::task;
+use std::thread::Thread;
 
 struct Foo;
 
@@ -32,6 +32,6 @@ fn foo() {
 }
 
 fn main() {
-    let _ = task::try(move|| foo());
+    let _ = Thread::spawn(move|| foo()).join();
     unsafe { assert!(DTOR_COUNT == 2); }
 }
diff --git a/src/test/run-pass/spawn-fn.rs b/src/test/run-pass/spawn-fn.rs
index b632bc77c75..c8fe400c4c3 100644
--- a/src/test/run-pass/spawn-fn.rs
+++ b/src/test/run-pass/spawn-fn.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn x(s: String, n: int) {
     println!("{}", s);
@@ -16,13 +16,13 @@ fn x(s: String, n: int) {
 }
 
 pub fn main() {
-    task::spawn(move|| x("hello from first spawned fn".to_string(), 65) );
-    task::spawn(move|| x("hello from second spawned fn".to_string(), 66) );
-    task::spawn(move|| x("hello from third spawned fn".to_string(), 67) );
+    let _t = Thread::spawn(|| x("hello from first spawned fn".to_string(), 65) );
+    let _t = Thread::spawn(|| x("hello from second spawned fn".to_string(), 66) );
+    let _t = Thread::spawn(|| x("hello from third spawned fn".to_string(), 67) );
     let mut i: int = 30;
     while i > 0 {
         i = i - 1;
         println!("parent sleeping");
-        task::deschedule();
+        Thread::yield_now();
     }
 }
diff --git a/src/test/run-pass/spawn-types.rs b/src/test/run-pass/spawn-types.rs
index 1c86e3e6ea2..bb9de7cecc9 100644
--- a/src/test/run-pass/spawn-types.rs
+++ b/src/test/run-pass/spawn-types.rs
@@ -14,7 +14,7 @@
   Arnold.
  */
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 type ctx = Sender<int>;
@@ -25,5 +25,6 @@ fn iotask(_tx: &ctx, ip: String) {
 
 pub fn main() {
     let (tx, _rx) = channel::<int>();
-    task::spawn(move|| iotask(&tx, "localhost".to_string()) );
+    let t = Thread::spawn(move|| iotask(&tx, "localhost".to_string()) );
+    t.join().ok().unwrap();
 }
diff --git a/src/test/run-pass/spawn.rs b/src/test/run-pass/spawn.rs
index cfc1967ae24..820dd49142a 100644
--- a/src/test/run-pass/spawn.rs
+++ b/src/test/run-pass/spawn.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
-    task::spawn(move|| child(10) );
+    Thread::spawn(move|| child(10)).join().ok().unwrap();
 }
 
 fn child(i: int) { println!("{}", i); assert!((i == 10)); }
diff --git a/src/test/run-pass/spawn2.rs b/src/test/run-pass/spawn2.rs
index 72db4de2c8d..50c2d79132e 100644
--- a/src/test/run-pass/spawn2.rs
+++ b/src/test/run-pass/spawn2.rs
@@ -8,9 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
-pub fn main() { task::spawn(move|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }
+pub fn main() {
+    let t = Thread::spawn(move|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) );
+    t.join().ok().unwrap();
+}
 
 fn child(args: (int, int, int, int, int, int, int, int, int)) {
     let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args;
diff --git a/src/test/run-pass/task-comm-0.rs b/src/test/run-pass/task-comm-0.rs
index de077ffd190..78826666f53 100644
--- a/src/test/run-pass/task-comm-0.rs
+++ b/src/test/run-pass/task-comm-0.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 pub fn main() { test05(); }
@@ -24,7 +24,7 @@ fn test05_start(tx : &Sender<int>) {
 
 fn test05() {
     let (tx, rx) = channel();
-    task::spawn(move|| { test05_start(&tx) });
+    let _t = Thread::spawn(move|| { test05_start(&tx) });
     let mut value: int = rx.recv().unwrap();
     println!("{}", value);
     value = rx.recv().unwrap();
diff --git a/src/test/run-pass/task-comm-1.rs b/src/test/run-pass/task-comm-1.rs
index 4117f201547..966bb6aa735 100644
--- a/src/test/run-pass/task-comm-1.rs
+++ b/src/test/run-pass/task-comm-1.rs
@@ -8,13 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() { test00(); }
 
 fn start() { println!("Started / Finished task."); }
 
 fn test00() {
-    task::try(move|| start() );
+    let _ = Thread::spawn(move|| start() ).join();
     println!("Completing.");
 }
diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs
index 93dca923b6b..60af3afec2b 100644
--- a/src/test/run-pass/task-comm-10.rs
+++ b/src/test/run-pass/task-comm-10.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::{channel, Sender};
 
 fn start(tx: &Sender<Sender<String>>) {
@@ -27,10 +27,10 @@ fn start(tx: &Sender<Sender<String>>) {
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _child = task::spawn(move|| { start(&tx) });
+    let _child = Thread::spawn(move|| { start(&tx) });
 
     let mut c = rx.recv().unwrap();
     c.send("A".to_string()).unwrap();
     c.send("B".to_string()).unwrap();
-    task::deschedule();
+    Thread::yield_now();
 }
diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs
index 8168e84e426..1740c49c772 100644
--- a/src/test/run-pass/task-comm-11.rs
+++ b/src/test/run-pass/task-comm-11.rs
@@ -9,17 +9,17 @@
 // except according to those terms.
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 fn start(tx: &Sender<Sender<int>>) {
     let (tx2, _rx) = channel();
-    tx.send(tx2);
+    tx.send(tx2).unwrap();
 }
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _child = task::spawn(move|| {
+    let _child = Thread::spawn(move|| {
         start(&tx)
     });
-    let _tx = rx.recv();
+    let _tx = rx.recv().unwrap();
 }
diff --git a/src/test/run-pass/task-comm-13.rs b/src/test/run-pass/task-comm-13.rs
index bb92ef38728..50667d375a1 100644
--- a/src/test/run-pass/task-comm-13.rs
+++ b/src/test/run-pass/task-comm-13.rs
@@ -9,16 +9,16 @@
 // except according to those terms.
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 fn start(tx: &Sender<int>, start: int, number_of_messages: int) {
     let mut i: int = 0;
-    while i < number_of_messages { tx.send(start + i); i += 1; }
+    while i< number_of_messages { tx.send(start + i).unwrap(); i += 1; }
 }
 
 pub fn main() {
     println!("Check that we don't deadlock.");
     let (tx, rx) = channel();
-    task::try(move|| { start(&tx, 0, 10) });
+    let _ = Thread::spawn(move|| { start(&tx, 0, 10) }).join();
     println!("Joined task");
 }
diff --git a/src/test/run-pass/task-comm-14.rs b/src/test/run-pass/task-comm-14.rs
index d63cbd5c8ba..82e4bd8f6d2 100644
--- a/src/test/run-pass/task-comm-14.rs
+++ b/src/test/run-pass/task-comm-14.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
     let (tx, rx) = channel();
@@ -19,7 +19,7 @@ pub fn main() {
     while (i > 0) {
         println!("{}", i);
         let tx = tx.clone();
-        task::spawn({let i = i; move|| { child(i, &tx) }});
+        Thread::spawn({let i = i; move|| { child(i, &tx) }}).detach();
         i = i - 1;
     }
 
@@ -29,7 +29,7 @@ pub fn main() {
     i = 10;
     while (i > 0) {
         println!("{}", i);
-        rx.recv();
+        rx.recv().unwrap();
         i = i - 1;
     }
 
@@ -38,5 +38,5 @@ pub fn main() {
 
 fn child(x: int, tx: &Sender<int>) {
     println!("{}", x);
-    tx.send(x);
+    tx.send(x).unwrap();
 }
diff --git a/src/test/run-pass/task-comm-15.rs b/src/test/run-pass/task-comm-15.rs
index 7c652ddc406..28eea784f36 100644
--- a/src/test/run-pass/task-comm-15.rs
+++ b/src/test/run-pass/task-comm-15.rs
@@ -9,12 +9,12 @@
 // except according to those terms.
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 fn start(tx: &Sender<int>, i0: int) {
     let mut i = i0;
     while i > 0 {
-        tx.send(0);
+        tx.send(0).unwrap();
         i = i - 1;
     }
 }
@@ -25,7 +25,7 @@ pub fn main() {
     // the child's point of view the receiver may die. We should
     // drop messages on the floor in this case, and not crash!
     let (tx, rx) = channel();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         start(&tx, 10)
     });
     rx.recv();
diff --git a/src/test/run-pass/task-comm-17.rs b/src/test/run-pass/task-comm-17.rs
index 3a591d12864..e9f7cdf96a8 100644
--- a/src/test/run-pass/task-comm-17.rs
+++ b/src/test/run-pass/task-comm-17.rs
@@ -12,11 +12,11 @@
 
 // This test is specifically about spawning temporary closures.
 
-use std::task;
+use std::thread::Thread;
 
 fn f() {
 }
 
 pub fn main() {
-    task::spawn(move|| f() );
+    let _t = Thread::spawn(move|| f() ).join();
 }
diff --git a/src/test/run-pass/task-comm-7.rs b/src/test/run-pass/task-comm-7.rs
index 054090eca39..6f3b47b8bfa 100644
--- a/src/test/run-pass/task-comm-7.rs
+++ b/src/test/run-pass/task-comm-7.rs
@@ -11,7 +11,7 @@
 #![allow(dead_assignment)]
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 pub fn main() { test00(); }
 
@@ -28,19 +28,19 @@ fn test00() {
     let number_of_messages: int = 10;
 
     let tx2 = tx.clone();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         test00_start(&tx2, number_of_messages * 0, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         test00_start(&tx2, number_of_messages * 1, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         test00_start(&tx2, number_of_messages * 2, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         test00_start(&tx2, number_of_messages * 3, number_of_messages);
     });
 
diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs
index 5c73f44f2d6..3f229926480 100644
--- a/src/test/run-pass/task-life-0.rs
+++ b/src/test/run-pass/task-life-0.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
-    task::spawn(move|| child("Hello".to_string()) );
+    let _t = Thread::spawn(move|| child("Hello".to_string()) );
 }
 
 fn child(_s: String) {
diff --git a/src/test/run-pass/task-spawn-move-and-copy.rs b/src/test/run-pass/task-spawn-move-and-copy.rs
index 623a30eda1a..b2bcf395783 100644
--- a/src/test/run-pass/task-spawn-move-and-copy.rs
+++ b/src/test/run-pass/task-spawn-move-and-copy.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 use std::sync::mpsc::channel;
 
 pub fn main() {
@@ -17,7 +17,7 @@ pub fn main() {
     let x = box 1;
     let x_in_parent = &(*x) as *const int as uint;
 
-    task::spawn(move || {
+    let _t = Thread::spawn(move || {
         let x_in_child = &(*x) as *const int as uint;
         tx.send(x_in_child).unwrap();
     });
diff --git a/src/test/run-pass/tcp-accept-stress.rs b/src/test/run-pass/tcp-accept-stress.rs
index 07f71fe580e..3e6158ca821 100644
--- a/src/test/run-pass/tcp-accept-stress.rs
+++ b/src/test/run-pass/tcp-accept-stress.rs
@@ -13,9 +13,10 @@
 //              quite quickly and it takes a few seconds for the sockets to get
 //              recycled.
 
-use std::sync::mpsc::channel;
 use std::io::{TcpListener, Listener, Acceptor, EndOfFile, TcpStream};
-use std::sync::{atomic, Arc};
+use std::sync::Arc;
+use std::sync::atomic::{AtomicUint, Ordering};
+use std::sync::mpsc::channel;
 use std::thread::Thread;
 
 static N: uint = 8;
@@ -29,7 +30,7 @@ fn test() {
     let mut l = TcpListener::bind("127.0.0.1:0").unwrap();
     let addr = l.socket_name().unwrap();
     let mut a = l.listen().unwrap();
-    let cnt = Arc::new(atomic::AtomicUint::new(0));
+    let cnt = Arc::new(AtomicUint::new(0));
 
     let (srv_tx, srv_rx) = channel();
     let (cli_tx, cli_rx) = channel();
@@ -42,7 +43,7 @@ fn test() {
             loop {
                 match a.accept() {
                     Ok(..) => {
-                        if cnt.fetch_add(1, atomic::SeqCst) == N * M - 1 {
+                        if cnt.fetch_add(1, Ordering::SeqCst) == N * M - 1 {
                             break
                         }
                     }
@@ -81,5 +82,5 @@ fn test() {
     assert_eq!(srv_rx.iter().take(N - 1).count(), N - 1);
 
     // Everything should have been accepted.
-    assert_eq!(cnt.load(atomic::SeqCst), N * M);
+    assert_eq!(cnt.load(Ordering::SeqCst), N * M);
 }
diff --git a/src/test/run-pass/tcp-connect-timeouts.rs b/src/test/run-pass/tcp-connect-timeouts.rs
index 38a762d5803..6812255d82c 100644
--- a/src/test/run-pass/tcp-connect-timeouts.rs
+++ b/src/test/run-pass/tcp-connect-timeouts.rs
@@ -27,6 +27,7 @@ use std::io::test::*;
 use std::io;
 use std::time::Duration;
 use std::sync::mpsc::channel;
+use std::thread::Thread;
 
 #[cfg_attr(target_os = "freebsd", ignore)]
 fn eventual_timeout() {
@@ -34,7 +35,7 @@ fn eventual_timeout() {
 
     let (tx1, rx1) = channel();
     let (_tx2, rx2) = channel::<()>();
-    std::task::spawn(move|| {
+    let _t = Thread::spawn(move|| {
         let _l = TcpListener::bind(addr).unwrap().listen();
         tx1.send(()).unwrap();
         let _ = rx2.recv();
diff --git a/src/test/run-pass/tempfile.rs b/src/test/run-pass/tempfile.rs
index 9e67095bb30..8fda8a95169 100644
--- a/src/test/run-pass/tempfile.rs
+++ b/src/test/run-pass/tempfile.rs
@@ -22,8 +22,8 @@ use std::io::fs::PathExtensions;
 use std::io::{fs, TempDir};
 use std::io;
 use std::os;
-use std::task;
 use std::sync::mpsc::channel;
+use std::thread::Thread;
 
 fn test_tempdir() {
     let path = {
@@ -42,7 +42,7 @@ fn test_rm_tempdir() {
         tx.send(tmp.path().clone()).unwrap();
         panic!("panic to unwind past `tmp`");
     };
-    task::try(f);
+    let _ = Thread::spawn(f).join();
     let path = rx.recv().unwrap();
     assert!(!path.exists());
 
@@ -52,7 +52,7 @@ fn test_rm_tempdir() {
         let _tmp = tmp;
         panic!("panic to unwind past `tmp`");
     };
-    task::try(f);
+    let _ = Thread::spawn(f).join();
     assert!(!path.exists());
 
     let path;
@@ -60,7 +60,7 @@ fn test_rm_tempdir() {
         let f = move|:| {
             TempDir::new("test_rm_tempdir").unwrap()
         };
-        let tmp = task::try(f).ok().expect("test_rm_tmdir");
+        let tmp = Thread::spawn(f).join().ok().expect("test_rm_tmdir");
         path = tmp.path().clone();
         assert!(path.exists());
     }
@@ -69,7 +69,7 @@ fn test_rm_tempdir() {
     let path;
     {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
-        path = tmp.unwrap();
+        path = tmp.into_inner();
     }
     assert!(path.exists());
     fs::rmdir_recursive(&path);
@@ -84,7 +84,7 @@ fn test_rm_tempdir_close() {
         tmp.close();
         panic!("panic when unwinding past `tmp`");
     };
-    task::try(f);
+    let _ = Thread::spawn(f).join();
     let path = rx.recv().unwrap();
     assert!(!path.exists());
 
@@ -95,7 +95,7 @@ fn test_rm_tempdir_close() {
         tmp.close();
         panic!("panic when unwinding past `tmp`");
     };
-    task::try(f);
+    let _ = Thread::spawn(f).join();
     assert!(!path.exists());
 
     let path;
@@ -103,7 +103,7 @@ fn test_rm_tempdir_close() {
         let f = move|:| {
             TempDir::new("test_rm_tempdir").unwrap()
         };
-        let tmp = task::try(f).ok().expect("test_rm_tmdir");
+        let tmp = Thread::spawn(f).join().ok().expect("test_rm_tmdir");
         path = tmp.path().clone();
         assert!(path.exists());
         tmp.close();
@@ -113,7 +113,7 @@ fn test_rm_tempdir_close() {
     let path;
     {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
-        path = tmp.unwrap();
+        path = tmp.into_inner();
     }
     assert!(path.exists());
     fs::rmdir_recursive(&path);
@@ -177,7 +177,7 @@ pub fn test_rmdir_recursive_ok() {
 }
 
 pub fn dont_double_panic() {
-    let r: Result<(), _> = task::try(move|| {
+    let r: Result<(), _> = Thread::spawn(move|| {
         let tmpdir = TempDir::new("test").unwrap();
         // Remove the temporary directory so that TempDir sees
         // an error on drop
@@ -185,7 +185,7 @@ pub fn dont_double_panic() {
         // Panic. If TempDir panics *again* due to the rmdir
         // error then the process will abort.
         panic!();
-    });
+    }).join();
     assert!(r.is_err());
 }
 
diff --git a/src/test/run-pass/terminate-in-initializer.rs b/src/test/run-pass/terminate-in-initializer.rs
index 28bbac1d087..4270ecc7450 100644
--- a/src/test/run-pass/terminate-in-initializer.rs
+++ b/src/test/run-pass/terminate-in-initializer.rs
@@ -12,7 +12,7 @@
 // Issue #787
 // Don't try to clean up uninitialized locals
 
-use std::task;
+use std::thread::Thread;
 
 fn test_break() { loop { let _x: Box<int> = break; } }
 
@@ -22,13 +22,13 @@ fn test_ret() { let _x: Box<int> = return; }
 
 fn test_panic() {
     fn f() { let _x: Box<int> = panic!(); }
-    task::try(move|| f() );
+    Thread::spawn(move|| f() ).join().err().unwrap();
 }
 
 fn test_panic_indirect() {
     fn f() -> ! { panic!(); }
     fn g() { let _x: Box<int> = f(); }
-    task::try(move|| g() );
+    Thread::spawn(move|| g() ).join().err().unwrap();
 }
 
 pub fn main() {
diff --git a/src/test/run-pass/threads.rs b/src/test/run-pass/threads.rs
index 71adf16c051..02817a285dd 100644
--- a/src/test/run-pass/threads.rs
+++ b/src/test/run-pass/threads.rs
@@ -8,11 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
     let mut i = 10;
-    while i > 0 { task::spawn({let i = i; move|| child(i)}); i = i - 1; }
+    while i > 0 {
+        Thread::spawn({let i = i; move|| child(i)}).detach();
+        i = i - 1;
+    }
     println!("main thread exiting");
 }
 
diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs
index 0d2cb60c213..c8abfcaa721 100644
--- a/src/test/run-pass/trait-bounds-in-arc.rs
+++ b/src/test/run-pass/trait-bounds-in-arc.rs
@@ -13,7 +13,7 @@
 
 use std::sync::Arc;
 use std::sync::mpsc::channel;
-use std::task;
+use std::thread::Thread;
 
 trait Pet {
     fn name(&self, blk: |&str|);
@@ -77,13 +77,13 @@ pub fn main() {
                             box dogge2 as Box<Pet+Sync+Send>));
     let (tx1, rx1) = channel();
     let arc1 = arc.clone();
-    task::spawn(move|| { check_legs(arc1); tx1.send(()); });
+    let _t1 = Thread::spawn(move|| { check_legs(arc1); tx1.send(()); });
     let (tx2, rx2) = channel();
     let arc2 = arc.clone();
-    task::spawn(move|| { check_names(arc2); tx2.send(()); });
+    let _t2 = Thread::spawn(move|| { check_names(arc2); tx2.send(()); });
     let (tx3, rx3) = channel();
     let arc3 = arc.clone();
-    task::spawn(move|| { check_pedigree(arc3); tx3.send(()); });
+    let _t3 = Thread::spawn(move|| { check_pedigree(arc3); tx3.send(()); });
     rx1.recv();
     rx2.recv();
     rx3.recv();
diff --git a/src/test/run-pass/unique-send-2.rs b/src/test/run-pass/unique-send-2.rs
index f88c458f2ed..bd4143348b8 100644
--- a/src/test/run-pass/unique-send-2.rs
+++ b/src/test/run-pass/unique-send-2.rs
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
 use std::sync::mpsc::{channel, Sender};
+use std::thread::Thread;
 
 fn child(tx: &Sender<Box<uint>>, i: uint) {
     tx.send(box i).unwrap();
@@ -21,9 +21,9 @@ pub fn main() {
     let mut expected = 0u;
     for i in range(0u, n) {
         let tx = tx.clone();
-        task::spawn(move|| {
+        Thread::spawn(move|| {
             child(&tx, i)
-        });
+        }).detach();
         expected += i;
     }
 
diff --git a/src/test/run-pass/unit-like-struct-drop-run.rs b/src/test/run-pass/unit-like-struct-drop-run.rs
index e3cd694c0de..9aeb5b10cf5 100644
--- a/src/test/run-pass/unit-like-struct-drop-run.rs
+++ b/src/test/run-pass/unit-like-struct-drop-run.rs
@@ -11,7 +11,7 @@
 // Make sure the destructor is run for unit-like structs.
 
 use std::boxed::BoxAny;
-use std::task;
+use std::thread::Thread;
 
 struct Foo;
 
@@ -22,9 +22,9 @@ impl Drop for Foo {
 }
 
 pub fn main() {
-    let x = task::try(move|| {
+    let x = Thread::spawn(move|| {
         let _b = Foo;
-    });
+    }).join();
 
     let s = x.unwrap_err().downcast::<&'static str>().unwrap();
     assert_eq!(s.as_slice(), "This panic should happen.");
diff --git a/src/test/run-pass/unwind-resource.rs b/src/test/run-pass/unwind-resource.rs
index 943b2d3edd1..3f59b2c6c76 100644
--- a/src/test/run-pass/unwind-resource.rs
+++ b/src/test/run-pass/unwind-resource.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use std::sync::mpsc::{channel, Sender};
-use std::task;
+use std::thread::Thread;
 
 struct complainer {
     tx: Sender<bool>,
@@ -37,7 +37,7 @@ fn f(tx: Sender<bool>) {
 
 pub fn main() {
     let (tx, rx) = channel();
-    task::spawn(move|| f(tx.clone()));
+    let _t = Thread::spawn(move|| f(tx.clone()));
     println!("hiiiiiiiii");
     assert!(rx.recv().unwrap());
 }
diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs
index 2f31ee25b5d..554a08ea644 100644
--- a/src/test/run-pass/unwind-unique.rs
+++ b/src/test/run-pass/unwind-unique.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 fn f() {
     let _a = box 0i;
@@ -16,5 +16,5 @@ fn f() {
 }
 
 pub fn main() {
-    task::spawn(f);
+    let _t = Thread::spawn(f);
 }
diff --git a/src/test/run-pass/utf8_chars.rs b/src/test/run-pass/utf8_chars.rs
index d343e485b24..1b2aa88cabe 100644
--- a/src/test/run-pass/utf8_chars.rs
+++ b/src/test/run-pass/utf8_chars.rs
@@ -15,29 +15,29 @@ use std::str;
 pub fn main() {
     // Chars of 1, 2, 3, and 4 bytes
     let chs: Vec<char> = vec!('e', 'é', '€', '\U00010000');
-    let s: String = String::from_chars(chs.as_slice()).to_string();
-    let schs: Vec<char> = s.as_slice().chars().collect();
+    let s: String = chs.iter().cloned().collect();
+    let schs: Vec<char> = s.chars().collect();
 
     assert!(s.len() == 10u);
-    assert!(s.as_slice().char_len() == 4u);
+    assert!(s.chars().count() == 4u);
     assert!(schs.len() == 4u);
-    assert!(String::from_chars(schs.as_slice()) == s);
-    assert!(s.as_slice().char_at(0u) == 'e');
-    assert!(s.as_slice().char_at(1u) == 'é');
+    assert!(schs.iter().cloned().collect::<String>() == s);
+    assert!(s.char_at(0u) == 'e');
+    assert!(s.char_at(1u) == 'é');
 
-    assert!((str::is_utf8(s.as_bytes())));
+    assert!((str::from_utf8(s.as_bytes()).is_ok()));
     // invalid prefix
-    assert!((!str::is_utf8(&[0x80_u8])));
+    assert!((!str::from_utf8(&[0x80_u8]).is_ok()));
     // invalid 2 byte prefix
-    assert!((!str::is_utf8(&[0xc0_u8])));
-    assert!((!str::is_utf8(&[0xc0_u8, 0x10_u8])));
+    assert!((!str::from_utf8(&[0xc0_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xc0_u8, 0x10_u8]).is_ok()));
     // invalid 3 byte prefix
-    assert!((!str::is_utf8(&[0xe0_u8])));
-    assert!((!str::is_utf8(&[0xe0_u8, 0x10_u8])));
-    assert!((!str::is_utf8(&[0xe0_u8, 0xff_u8, 0x10_u8])));
+    assert!((!str::from_utf8(&[0xe0_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xe0_u8, 0x10_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xe0_u8, 0xff_u8, 0x10_u8]).is_ok()));
     // invalid 4 byte prefix
-    assert!((!str::is_utf8(&[0xf0_u8])));
-    assert!((!str::is_utf8(&[0xf0_u8, 0x10_u8])));
-    assert!((!str::is_utf8(&[0xf0_u8, 0xff_u8, 0x10_u8])));
-    assert!((!str::is_utf8(&[0xf0_u8, 0xff_u8, 0xff_u8, 0x10_u8])));
+    assert!((!str::from_utf8(&[0xf0_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xf0_u8, 0x10_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xf0_u8, 0xff_u8, 0x10_u8]).is_ok()));
+    assert!((!str::from_utf8(&[0xf0_u8, 0xff_u8, 0xff_u8, 0x10_u8]).is_ok()));
 }
diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs
index 2da0ecd6d51..bdd62995e0a 100644
--- a/src/test/run-pass/vector-sort-panic-safe.rs
+++ b/src/test/run-pass/vector-sort-panic-safe.rs
@@ -8,9 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
-use std::sync::atomic::{AtomicUint, ATOMIC_UINT_INIT, Relaxed};
+use std::sync::atomic::{AtomicUint, ATOMIC_UINT_INIT, Ordering};
 use std::rand::{thread_rng, Rng, Rand};
+use std::thread::Thread;
 
 const REPEATS: uint = 5;
 const MAX_LEN: uint = 32;
@@ -36,7 +36,7 @@ struct DropCounter { x: uint, creation_id: uint }
 impl Rand for DropCounter {
     fn rand<R: Rng>(rng: &mut R) -> DropCounter {
         // (we're not using this concurrently, so Relaxed is fine.)
-        let num = creation_count.fetch_add(1, Relaxed);
+        let num = creation_count.fetch_add(1, Ordering::Relaxed);
         DropCounter {
             x: rng.gen(),
             creation_id: num
@@ -46,7 +46,7 @@ impl Rand for DropCounter {
 
 impl Drop for DropCounter {
     fn drop(&mut self) {
-        drop_counts[self.creation_id].fetch_add(1, Relaxed);
+        drop_counts[self.creation_id].fetch_add(1, Ordering::Relaxed);
     }
 }
 
@@ -57,7 +57,7 @@ pub fn main() {
         for _ in range(0, REPEATS) {
             // reset the count for these new DropCounters, so their
             // IDs start from 0.
-            creation_count.store(0, Relaxed);
+            creation_count.store(0, Ordering::Relaxed);
 
             let main = thread_rng().gen_iter::<DropCounter>()
                                  .take(len)
@@ -72,27 +72,27 @@ pub fn main() {
             for panic_countdown in range(0i, count) {
                 // refresh the counters.
                 for c in drop_counts.iter() {
-                    c.store(0, Relaxed);
+                    c.store(0, Ordering::Relaxed);
                 }
 
                 let v = main.clone();
 
-                let _ = task::try(move|| {
-                        let mut v = v;
-                        let mut panic_countdown = panic_countdown;
-                        v.as_mut_slice().sort_by(|a, b| {
-                                if panic_countdown == 0 {
-                                    panic!()
-                                }
-                                panic_countdown -= 1;
-                                a.cmp(b)
-                            })
-                    });
+                let _ = Thread::spawn(move|| {
+                    let mut v = v;
+                    let mut panic_countdown = panic_countdown;
+                    v.as_mut_slice().sort_by(|a, b| {
+                        if panic_countdown == 0 {
+                            panic!()
+                        }
+                        panic_countdown -= 1;
+                        a.cmp(b)
+                    })
+                }).join();
 
                 // check that the number of things dropped is exactly
                 // what we expect (i.e. the contents of `v`).
                 for (i, c) in drop_counts.iter().enumerate().take(len) {
-                    let count = c.load(Relaxed);
+                    let count = c.load(Ordering::Relaxed);
                     assert!(count == 1,
                             "found drop count == {} for i == {}, len == {}",
                             count, i, len);
diff --git a/src/test/run-pass/wait-forked-but-failed-child.rs b/src/test/run-pass/wait-forked-but-failed-child.rs
index 624b4176704..eb7205b5e0a 100644
--- a/src/test/run-pass/wait-forked-but-failed-child.rs
+++ b/src/test/run-pass/wait-forked-but-failed-child.rs
@@ -11,8 +11,6 @@
 extern crate libc;
 
 use std::io::process::Command;
-use std::iter::IteratorExt;
-use std::str::from_str;
 
 use libc::funcs::posix88::unistd;
 
@@ -41,9 +39,10 @@ fn find_zombies() {
 
     for (line_no, line) in ps_output.split('\n').enumerate() {
         if 0 < line_no && 0 < line.len() &&
-           my_pid == from_str(line.split(' ').filter(|w| 0 < w.len()).nth(1)
-               .expect("1st column should be PPID")
-               ).expect("PPID string into integer") &&
+           my_pid == line.split(' ').filter(|w| 0 < w.len()).nth(1)
+                         .expect("1st column should be PPID")
+                         .parse()
+                         .expect("PPID string into integer") &&
            line.contains("defunct") {
             panic!("Zombie child {}", line);
         }
@@ -56,12 +55,12 @@ fn find_zombies() { }
 fn main() {
     let too_long = format!("/NoSuchCommand{:0300}", 0u8);
 
-    let _failures = Vec::from_fn(100, |_i| {
+    let _failures = range(0, 100).map(|_| {
         let cmd = Command::new(too_long.as_slice());
         let failed = cmd.spawn();
         assert!(failed.is_err(), "Make sure the command fails to spawn(): {}", cmd);
         failed
-    });
+    }).collect::<Vec<_>>();
 
     find_zombies();
     // then _failures goes out of scope
diff --git a/src/test/run-pass/weak-lang-item.rs b/src/test/run-pass/weak-lang-item.rs
index 87226eedfdc..08dac5c7c82 100644
--- a/src/test/run-pass/weak-lang-item.rs
+++ b/src/test/run-pass/weak-lang-item.rs
@@ -12,10 +12,10 @@
 
 extern crate "weak-lang-items" as other;
 
-use std::task;
+use std::thread::Thread;
 
 fn main() {
-    let _ = task::try(move|| {
+    let _ = Thread::spawn(move|| {
         other::foo()
     });
 }
diff --git a/src/test/run-pass/yield2.rs b/src/test/run-pass/yield2.rs
index c6cb0dd65e7..66ad7de0296 100644
--- a/src/test/run-pass/yield2.rs
+++ b/src/test/run-pass/yield2.rs
@@ -8,9 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::task;
+use std::thread::Thread;
 
 pub fn main() {
     let mut i: int = 0;
-    while i < 100 { i = i + 1; println!("{}", i); task::deschedule(); }
+    while i < 100 { i = i + 1; println!("{}", i); Thread::yield_now(); }
 }