about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-30 20:18:16 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-30 20:18:16 +0530
commit3b4547010011b948168d64eb8d05a5cfa7652765 (patch)
treed3e133c446a8aab157f145122223c7d2ab944dc1 /src/libstd
parentdb50084cd9d83f7b342f481c2d03f78b50d99059 (diff)
parentd9252bde18360e5815f0d83a83efd597bc6bb5b7 (diff)
downloadrust-3b4547010011b948168d64eb8d05a5cfa7652765.tar.gz
rust-3b4547010011b948168d64eb8d05a5cfa7652765.zip
Rollup merge of #23855 - tshepang:doc-nit, r=Manishearth
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/ascii.rs102
-rw-r--r--src/libstd/collections/hash/bench.rs2
-rw-r--r--src/libstd/collections/hash/map.rs44
-rw-r--r--src/libstd/collections/hash/set.rs24
-rw-r--r--src/libstd/collections/hash/table.rs4
-rw-r--r--src/libstd/dynamic_lib.rs54
-rw-r--r--src/libstd/ffi/c_str.rs2
-rw-r--r--src/libstd/ffi/os_str.rs20
-rw-r--r--src/libstd/fs/tempdir.rs2
-rw-r--r--src/libstd/io/buffered.rs6
-rw-r--r--src/libstd/io/mod.rs9
-rw-r--r--src/libstd/io/stdio.rs24
-rw-r--r--src/libstd/lib.rs13
-rw-r--r--src/libstd/macros.rs2
-rw-r--r--src/libstd/net/parser.rs18
-rw-r--r--src/libstd/num/f32.rs42
-rw-r--r--src/libstd/num/f64.rs42
-rw-r--r--src/libstd/num/strconv.rs52
-rw-r--r--src/libstd/old_io/buffered.rs32
-rw-r--r--src/libstd/old_io/comm_adapters.rs6
-rw-r--r--src/libstd/old_io/extensions.rs30
-rw-r--r--src/libstd/old_io/fs.rs20
-rw-r--r--src/libstd/old_io/mem.rs34
-rw-r--r--src/libstd/old_io/mod.rs106
-rw-r--r--src/libstd/old_io/net/addrinfo.rs12
-rw-r--r--src/libstd/old_io/net/ip.rs6
-rw-r--r--src/libstd/old_io/net/pipe.rs7
-rw-r--r--src/libstd/old_io/net/tcp.rs33
-rw-r--r--src/libstd/old_io/net/udp.rs6
-rw-r--r--src/libstd/old_io/pipe.rs2
-rw-r--r--src/libstd/old_io/process.rs38
-rw-r--r--src/libstd/old_io/result.rs9
-rw-r--r--src/libstd/old_io/stdio.rs18
-rw-r--r--src/libstd/old_io/tempfile.rs4
-rw-r--r--src/libstd/old_io/util.rs28
-rw-r--r--src/libstd/old_path/mod.rs2
-rw-r--r--src/libstd/old_path/posix.rs6
-rw-r--r--src/libstd/old_path/windows.rs30
-rw-r--r--src/libstd/os.rs56
-rw-r--r--src/libstd/path.rs40
-rw-r--r--src/libstd/prelude/v1.rs2
-rw-r--r--src/libstd/process.rs2
-rw-r--r--src/libstd/rand/mod.rs50
-rw-r--r--src/libstd/rand/reader.rs2
-rw-r--r--src/libstd/rt/args.rs8
-rw-r--r--src/libstd/rt/libunwind.rs14
-rw-r--r--src/libstd/rt/mod.rs14
-rw-r--r--src/libstd/rt/unwind.rs14
-rw-r--r--src/libstd/rt/util.rs2
-rw-r--r--src/libstd/sync/future.rs2
-rw-r--r--src/libstd/sync/mpsc/mod.rs8
-rw-r--r--src/libstd/sync/mpsc/shared.rs2
-rw-r--r--src/libstd/sync/rwlock.rs2
-rw-r--r--src/libstd/sync/semaphore.rs4
-rw-r--r--src/libstd/sys/common/backtrace.rs8
-rw-r--r--src/libstd/sys/common/helper_thread.rs14
-rw-r--r--src/libstd/sys/common/mod.rs12
-rw-r--r--src/libstd/sys/common/net.rs58
-rw-r--r--src/libstd/sys/common/stack.rs50
-rw-r--r--src/libstd/sys/common/thread_info.rs6
-rw-r--r--src/libstd/sys/common/thread_local.rs14
-rw-r--r--src/libstd/sys/common/wtf8.rs34
-rw-r--r--src/libstd/sys/unix/backtrace.rs14
-rw-r--r--src/libstd/sys/unix/c.rs6
-rw-r--r--src/libstd/sys/unix/fs.rs18
-rw-r--r--src/libstd/sys/unix/os.rs10
-rw-r--r--src/libstd/sys/unix/os_str.rs4
-rw-r--r--src/libstd/sys/unix/pipe.rs4
-rw-r--r--src/libstd/sys/unix/process.rs10
-rw-r--r--src/libstd/sys/unix/stack_overflow.rs6
-rw-r--r--src/libstd/sys/unix/sync.rs24
-rw-r--r--src/libstd/sys/unix/tcp.rs2
-rw-r--r--src/libstd/sys/unix/timer.rs12
-rw-r--r--src/libstd/sys/unix/tty.rs6
-rw-r--r--src/libstd/sys/windows/backtrace.rs7
-rw-r--r--src/libstd/sys/windows/fs.rs18
-rw-r--r--src/libstd/sys/windows/os_str.rs4
-rw-r--r--src/libstd/sys/windows/pipe.rs18
-rw-r--r--src/libstd/sys/windows/process.rs10
-rw-r--r--src/libstd/sys/windows/process2.rs2
-rw-r--r--src/libstd/sys/windows/stack_overflow.rs6
-rw-r--r--src/libstd/sys/windows/tcp.rs2
-rw-r--r--src/libstd/sys/windows/thread.rs4
-rw-r--r--src/libstd/sys/windows/thread_local.rs10
-rw-r--r--src/libstd/sys/windows/timer.rs6
-rw-r--r--src/libstd/sys/windows/tty.rs12
-rw-r--r--src/libstd/thread/mod.rs53
87 files changed, 837 insertions, 740 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs
index 93215090d95..20ad71a4bf8 100644
--- a/src/libstd/ascii.rs
+++ b/src/libstd/ascii.rs
@@ -34,7 +34,7 @@ pub trait OwnedAsciiExt {
     fn into_ascii_lowercase(self) -> Self;
 }
 
-/// Extension methods for ASCII-subset only operations on string slices
+/// Extension methods for ASCII-subset only operations on string slices.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait AsciiExt {
     /// Container type for copied ASCII characters.
@@ -42,36 +42,116 @@ pub trait AsciiExt {
     type Owned;
 
     /// Check if within the ASCII range.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let ascii = 'a';
+    /// let utf8 = '❤';
+    ///
+    /// assert_eq!(true, ascii.is_ascii());
+    /// assert_eq!(false, utf8.is_ascii())
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn is_ascii(&self) -> bool;
 
-    /// Makes a copy of the string in ASCII upper case:
+    /// Makes a copy of the string in ASCII upper case.
+    ///
     /// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
     /// but non-ASCII letters are unchanged.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let ascii = 'a';
+    /// let utf8 = '❤';
+    ///
+    /// assert_eq!('A', ascii.to_ascii_uppercase());
+    /// assert_eq!('❤', utf8.to_ascii_uppercase());
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn to_ascii_uppercase(&self) -> Self::Owned;
 
-    /// Makes a copy of the string in ASCII lower case:
+    /// Makes a copy of the string in ASCII lower case.
+    ///
     /// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
     /// but non-ASCII letters are unchanged.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let ascii = 'A';
+    /// let utf8 = '❤';
+    ///
+    /// assert_eq!('a', ascii.to_ascii_lowercase());
+    /// assert_eq!('❤', utf8.to_ascii_lowercase());
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn to_ascii_lowercase(&self) -> Self::Owned;
 
     /// Check that two strings are an ASCII case-insensitive match.
+    ///
     /// Same as `to_ascii_lowercase(a) == to_ascii_lowercase(b)`,
     /// but without allocating and copying temporary strings.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let ascii1 = 'A';
+    /// let ascii2 = 'a';
+    /// let ascii3 = 'A';
+    /// let ascii4 = 'z';
+    ///
+    /// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii2));
+    /// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii3));
+    /// assert_eq!(false, ascii1.eq_ignore_ascii_case(&ascii4));
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
 
     /// Convert this type to its ASCII upper case equivalent in-place.
     ///
     /// See `to_ascii_uppercase` for more information.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![feature(ascii)]
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let mut ascii = 'a';
+    ///
+    /// ascii.make_ascii_uppercase();
+    ///
+    /// assert_eq!('A', ascii);
+    /// ```
     #[unstable(feature = "ascii")]
     fn make_ascii_uppercase(&mut self);
 
     /// Convert this type to its ASCII lower case equivalent in-place.
     ///
     /// See `to_ascii_lowercase` for more information.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # #![feature(ascii)]
+    /// use std::ascii::AsciiExt;
+    ///
+    /// let mut ascii = 'A';
+    ///
+    /// ascii.make_ascii_lowercase();
+    ///
+    /// assert_eq!('a', ascii);
+    /// ```
     #[unstable(feature = "ascii")]
     fn make_ascii_lowercase(&mut self);
 }
@@ -246,7 +326,7 @@ pub struct EscapeDefault {
     data: [u8; 4],
 }
 
-/// Returns a 'default' ASCII and C++11-like literal escape of a `u8`
+/// Returns an iterator that produces an escaped version of a `u8`.
 ///
 /// The default is chosen with a bias toward producing literals that are
 /// legal in a variety of languages, including C++11 and similar C-family
@@ -257,6 +337,20 @@ pub struct EscapeDefault {
 /// - Any other chars in the range [0x20,0x7e] are not escaped.
 /// - Any other chars are given hex escapes of the form '\xNN'.
 /// - Unicode escapes are never generated by this function.
+///
+/// # Examples
+///
+/// ```
+/// use std::ascii;
+///
+/// let escaped = ascii::escape_default(b'0').next().unwrap();
+/// assert_eq!(b'0', escaped);
+///
+/// let mut escaped = ascii::escape_default(b'\t');
+///
+/// assert_eq!(b'\\', escaped.next().unwrap());
+/// assert_eq!(b't', escaped.next().unwrap());
+/// ```
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn escape_default(c: u8) -> EscapeDefault {
     let (data, len) = match c {
diff --git a/src/libstd/collections/hash/bench.rs b/src/libstd/collections/hash/bench.rs
index ca506e8c36f..ac21ae0f0aa 100644
--- a/src/libstd/collections/hash/bench.rs
+++ b/src/libstd/collections/hash/bench.rs
@@ -14,7 +14,7 @@ extern crate test;
 use prelude::v1::*;
 
 use self::test::Bencher;
-use iter::{range_inclusive};
+use iter::range_inclusive;
 
 #[bench]
 fn new_drop(b : &mut Bencher) {
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 06d1e69fff0..bc0f109de15 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -20,7 +20,7 @@ use cmp::{max, Eq, PartialEq};
 use default::Default;
 use fmt::{self, Debug};
 use hash::{Hash, SipHasher};
-use iter::{self, Iterator, ExactSizeIterator, IntoIterator, IteratorExt, FromIterator, Extend, Map};
+use iter::{self, Iterator, ExactSizeIterator, IntoIterator, FromIterator, Extend, Map};
 use marker::Sized;
 use mem::{self, replace};
 use ops::{Deref, FnMut, FnOnce, Index};
@@ -214,7 +214,14 @@ fn test_resize_policy() {
 /// overridden with one of the constructors.
 ///
 /// It is required that the keys implement the `Eq` and `Hash` traits, although
-/// this can frequently be achieved by using `#[derive(Eq, Hash)]`.
+/// this can frequently be achieved by using `#[derive(Eq, Hash)]`. If you
+/// implement these yourself, it is important that the following property holds:
+///
+/// ```text
+/// k1 == k2 -> hash(k1) == hash(k2)
+/// ```
+///
+/// In other words, if two keys are equal, their hashes must be equal.
 ///
 /// It is a logic error for a key to be modified in such a way that the key's
 /// hash, as determined by the `Hash` trait, or its equality, as determined by
@@ -505,7 +512,7 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomState> {
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::new();
+    /// let mut map: HashMap<&str, isize> = HashMap::new();
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -519,7 +526,7 @@ impl<K: Hash + Eq, V> HashMap<K, V, RandomState> {
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::with_capacity(10);
+    /// let mut map: HashMap<&str, isize> = HashMap::with_capacity(10);
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -596,7 +603,7 @@ impl<K, V, S> HashMap<K, V, S>
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let map: HashMap<int, int> = HashMap::with_capacity(100);
+    /// let map: HashMap<isize, isize> = HashMap::with_capacity(100);
     /// assert!(map.capacity() >= 100);
     /// ```
     #[inline]
@@ -617,7 +624,7 @@ impl<K, V, S> HashMap<K, V, S>
     ///
     /// ```
     /// use std::collections::HashMap;
-    /// let mut map: HashMap<&str, int> = HashMap::new();
+    /// let mut map: HashMap<&str, isize> = HashMap::new();
     /// map.reserve(10);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -725,7 +732,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// ```
     /// use std::collections::HashMap;
     ///
-    /// let mut map: HashMap<int, int> = HashMap::with_capacity(100);
+    /// let mut map: HashMap<isize, isize> = HashMap::with_capacity(100);
     /// map.insert(1, 2);
     /// map.insert(3, 4);
     /// assert!(map.capacity() >= 100);
@@ -797,9 +804,9 @@ impl<K, V, S> HashMap<K, V, S>
                 }
             }
 
-            let robin_ib = bucket.index() as int - bucket.distance() as int;
+            let robin_ib = bucket.index() as isize - bucket.distance() as isize;
 
-            if (ib as int) < robin_ib {
+            if (ib as isize) < robin_ib {
                 // Found a luckier bucket than me. Better steal his spot.
                 return robin_hood(bucket, robin_ib as usize, hash, k, v);
             }
@@ -924,7 +931,7 @@ impl<K, V, S> HashMap<K, V, S>
     /// map.insert("c", 3);
     ///
     /// // Not possible with .iter()
-    /// let vec: Vec<(&str, int)> = map.into_iter().collect();
+    /// let vec: Vec<(&str, isize)> = map.into_iter().collect();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn into_iter(self) -> IntoIter<K, V> {
@@ -1188,9 +1195,9 @@ fn search_entry_hashed<'a, K: Eq, V>(table: &'a mut RawTable<K,V>, hash: SafeHas
             }
         }
 
-        let robin_ib = bucket.index() as int - bucket.distance() as int;
+        let robin_ib = bucket.index() as isize - bucket.distance() as isize;
 
-        if (ib as int) < robin_ib {
+        if (ib as isize) < robin_ib {
             // Found a luckier bucket than me. Better steal his spot.
             return Vacant(VacantEntry {
                 hash: hash,
@@ -1226,14 +1233,7 @@ impl<K, V, S> Debug for HashMap<K, V, S>
     where K: Eq + Hash + Debug, V: Debug, S: HashState
 {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "{{"));
-
-        for (i, (k, v)) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{:?}: {:?}", *k, *v));
-        }
-
-        write!(f, "}}")
+        self.iter().fold(f.debug_map(), |b, (k, v)| b.entry(k, v)).finish()
     }
 }
 
@@ -1657,7 +1657,7 @@ mod test_map {
         assert_eq!(*m.get(&2).unwrap(), 4);
     }
 
-    thread_local! { static DROP_VECTOR: RefCell<Vec<int>> = RefCell::new(Vec::new()) }
+    thread_local! { static DROP_VECTOR: RefCell<Vec<isize>> = RefCell::new(Vec::new()) }
 
     #[derive(Hash, PartialEq, Eq)]
     struct Dropable {
@@ -1814,7 +1814,7 @@ mod test_map {
 
     #[test]
     fn test_empty_pop() {
-        let mut m: HashMap<int, bool> = HashMap::new();
+        let mut m: HashMap<isize, bool> = HashMap::new();
         assert_eq!(m.remove(&0), None);
     }
 
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs
index 0933b4f662a..87380471c80 100644
--- a/src/libstd/collections/hash/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -18,9 +18,7 @@ use default::Default;
 use fmt::Debug;
 use fmt;
 use hash::Hash;
-use iter::{
-    Iterator, IntoIterator, ExactSizeIterator, IteratorExt, FromIterator, Map, Chain, Extend,
-};
+use iter::{Iterator, IntoIterator, ExactSizeIterator, FromIterator, Map, Chain, Extend};
 use ops::{BitOr, BitAnd, BitXor, Sub};
 use option::Option::{Some, None, self};
 
@@ -36,7 +34,16 @@ use super::state::HashState;
 
 /// An implementation of a hash set using the underlying representation of a
 /// HashMap where the value is (). As with the `HashMap` type, a `HashSet`
-/// requires that the elements implement the `Eq` and `Hash` traits.
+/// requires that the elements implement the `Eq` and `Hash` traits. This can
+/// frequently be achieved by using `#[derive(Eq, Hash)]`. If you implement
+/// these yourself, it is important that the following property holds:
+///
+/// ```text
+/// k1 == k2 -> hash(k1) == hash(k2)
+/// ```
+///
+/// In other words, if two keys are equal, their hashes must be equal.
+///
 ///
 /// It is a logic error for an item to be modified in such a way that the
 /// item's hash, as determined by the `Hash` trait, or its equality, as
@@ -614,14 +621,7 @@ impl<T, S> fmt::Debug for HashSet<T, S>
           S: HashState
 {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "{{"));
-
-        for (i, x) in self.iter().enumerate() {
-            if i != 0 { try!(write!(f, ", ")); }
-            try!(write!(f, "{:?}", *x));
-        }
-
-        write!(f, "}}")
+        self.iter().fold(f.debug_set(), |b, e| b.entry(e)).finish()
     }
 }
 
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 052bcfd7e16..8f659334538 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -15,7 +15,7 @@ use self::BucketState::*;
 use clone::Clone;
 use cmp;
 use hash::{Hash, Hasher};
-use iter::{Iterator, IteratorExt, ExactSizeIterator, count};
+use iter::{Iterator, ExactSizeIterator, count};
 use marker::{Copy, Send, Sync, Sized, self};
 use mem::{min_align_of, size_of};
 use mem;
@@ -985,7 +985,7 @@ impl<K: Clone, V: Clone> Clone for RawTable<K, V> {
 #[unsafe_destructor]
 impl<K, V> Drop for RawTable<K, V> {
     fn drop(&mut self) {
-        if self.capacity == 0 {
+        if self.capacity == 0 || self.capacity == mem::POST_DROP_USIZE {
             return;
         }
 
diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs
index 085bf01612d..d8a95133d94 100644
--- a/src/libstd/dynamic_lib.rs
+++ b/src/libstd/dynamic_lib.rs
@@ -14,16 +14,13 @@
 
 #![unstable(feature = "std_misc")]
 #![allow(missing_docs)]
-#![allow(deprecated)] // will be addressed by #23197
 
 use prelude::v1::*;
 
 use env;
-use ffi::CString;
+use ffi::{AsOsStr, CString, OsString};
 use mem;
-use old_path::{Path, GenericPath};
-use os;
-use str;
+use path::{Path, PathBuf};
 
 pub struct DynamicLibrary {
     handle: *mut u8
@@ -54,7 +51,7 @@ impl DynamicLibrary {
     /// Lazily open a dynamic library. When passed None it gives a
     /// handle to the calling process
     pub fn open(filename: Option<&Path>) -> Result<DynamicLibrary, String> {
-        let maybe_library = dl::open(filename.map(|path| path.as_vec()));
+        let maybe_library = dl::open(filename.map(|path| path.as_os_str()));
 
         // The dynamic library must not be constructed if there is
         // an error opening the library so the destructor does not
@@ -68,19 +65,17 @@ impl DynamicLibrary {
     /// Prepends a path to this process's search path for dynamic libraries
     pub fn prepend_search_path(path: &Path) {
         let mut search_path = DynamicLibrary::search_path();
-        search_path.insert(0, path.clone());
-        let newval = DynamicLibrary::create_path(&search_path);
-        env::set_var(DynamicLibrary::envvar(),
-                     str::from_utf8(&newval).unwrap());
+        search_path.insert(0, path.to_path_buf());
+        env::set_var(DynamicLibrary::envvar(), &DynamicLibrary::create_path(&search_path));
     }
 
     /// From a slice of paths, create a new vector which is suitable to be an
     /// environment variable for this platforms dylib search path.
-    pub fn create_path(path: &[Path]) -> Vec<u8> {
-        let mut newvar = Vec::new();
+    pub fn create_path(path: &[PathBuf]) -> OsString {
+        let mut newvar = OsString::new();
         for (i, path) in path.iter().enumerate() {
             if i > 0 { newvar.push(DynamicLibrary::separator()); }
-            newvar.push_all(path.as_vec());
+            newvar.push(path);
         }
         return newvar;
     }
@@ -97,15 +92,15 @@ impl DynamicLibrary {
         }
     }
 
-    fn separator() -> u8 {
-        if cfg!(windows) {b';'} else {b':'}
+    fn separator() -> &'static str {
+        if cfg!(windows) { ";" } else { ":" }
     }
 
     /// Returns the current search path for dynamic libraries being used by this
     /// process
-    pub fn search_path() -> Vec<Path> {
+    pub fn search_path() -> Vec<PathBuf> {
         match env::var_os(DynamicLibrary::envvar()) {
-            Some(var) => os::split_paths(var.to_str().unwrap()),
+            Some(var) => env::split_paths(&var).collect(),
             None => Vec::new(),
         }
     }
@@ -134,8 +129,8 @@ mod test {
     use super::*;
     use prelude::v1::*;
     use libc;
-    use old_path::Path;
     use mem;
+    use path::Path;
 
     #[test]
     #[cfg_attr(any(windows, target_os = "android"), ignore)] // FIXME #8818, #10379
@@ -192,12 +187,13 @@ mod test {
 mod dl {
     use prelude::v1::*;
 
-    use ffi::{CString, CStr};
+    use ffi::{CStr, OsStr};
     use str;
     use libc;
+    use os::unix::prelude::*;
     use ptr;
 
-    pub fn open(filename: Option<&[u8]>) -> Result<*mut u8, String> {
+    pub fn open(filename: Option<&OsStr>) -> Result<*mut u8, String> {
         check_for_errors_in(|| {
             unsafe {
                 match filename {
@@ -210,8 +206,8 @@ mod dl {
 
     const LAZY: libc::c_int = 1;
 
-    unsafe fn open_external(filename: &[u8]) -> *mut u8 {
-        let s = CString::new(filename).unwrap();
+    unsafe fn open_external(filename: &OsStr) -> *mut u8 {
+        let s = filename.to_cstring().unwrap();
         dlopen(s.as_ptr(), LAZY) as *mut u8
     }
 
@@ -264,21 +260,22 @@ mod dl {
 
 #[cfg(target_os = "windows")]
 mod dl {
-    use iter::IteratorExt;
+    use ffi::OsStr;
+    use iter::Iterator;
     use libc;
     use libc::consts::os::extra::ERROR_CALL_NOT_IMPLEMENTED;
     use ops::FnOnce;
-    use os;
+    use sys::os;
+    use os::windows::prelude::*;
     use option::Option::{self, Some, None};
     use ptr;
     use result::Result;
     use result::Result::{Ok, Err};
-    use str;
     use string::String;
     use vec::Vec;
     use sys::c::compat::kernel32::SetThreadErrorMode;
 
-    pub fn open(filename: Option<&[u8]>) -> Result<*mut u8, String> {
+    pub fn open(filename: Option<&OsStr>) -> Result<*mut u8, String> {
         // disable "dll load failed" error dialog.
         let mut use_thread_mode = true;
         let prev_error_mode = unsafe {
@@ -308,9 +305,8 @@ mod dl {
 
         let result = match filename {
             Some(filename) => {
-                let filename_str = str::from_utf8(filename).unwrap();
-                let mut filename_str: Vec<u16> = filename_str.utf16_units().collect();
-                filename_str.push(0);
+                let filename_str: Vec<_> =
+                    filename.encode_wide().chain(Some(0).into_iter()).collect();
                 let result = unsafe {
                     LoadLibraryW(filename_str.as_ptr() as *const libc::c_void)
                 };
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 8b19d160172..a00f7708025 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -15,7 +15,7 @@ use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
 use error::{Error, FromError};
 use fmt;
 use io;
-use iter::IteratorExt;
+use iter::Iterator;
 use libc;
 use mem;
 #[allow(deprecated)]
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index 99cbd26bcd1..49dbac4585b 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -113,23 +113,9 @@ impl From<String> for OsString {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a String> for OsString {
-    fn from(s: &'a String) -> OsString {
-        OsString { inner: Buf::from_str(s) }
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a str> for OsString {
-    fn from(s: &'a str) -> OsString {
-        OsString { inner: Buf::from_str(s) }
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a OsStr> for OsString {
-    fn from(s: &'a OsStr) -> OsString {
-        OsString { inner: s.inner.to_owned() }
+impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for OsString {
+    fn from(s: &'a T) -> OsString {
+        s.as_ref().to_os_string()
     }
 }
 
diff --git a/src/libstd/fs/tempdir.rs b/src/libstd/fs/tempdir.rs
index a9717e36323..8cc1dde98a0 100644
--- a/src/libstd/fs/tempdir.rs
+++ b/src/libstd/fs/tempdir.rs
@@ -34,7 +34,7 @@ const NUM_RETRIES: u32 = 1 << 31;
 // be enough to dissuade an attacker from trying to preemptively create names
 // of that length, but not so huge that we unnecessarily drain the random number
 // generator of entropy.
-const NUM_RAND_CHARS: uint = 12;
+const NUM_RAND_CHARS: usize = 12;
 
 impl TempDir {
     /// Attempts to make a temporary directory inside of `tmpdir` whose name
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 2a1294f23b2..998f37e6a68 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -98,7 +98,7 @@ impl<R: Read> BufRead for BufReader<R> {
         self.buf.fill_buf()
     }
 
-    fn consume(&mut self, amt: uint) {
+    fn consume(&mut self, amt: usize) {
         self.buf.consume(amt)
     }
 }
@@ -427,7 +427,7 @@ impl<S: Read + Write> BufStream<S> {
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<S: Read + Write> BufRead for BufStream<S> {
     fn fill_buf(&mut self) -> io::Result<&[u8]> { self.inner.fill_buf() }
-    fn consume(&mut self, amt: uint) { self.inner.consume(amt) }
+    fn consume(&mut self, amt: usize) { self.inner.consume(amt) }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -681,7 +681,7 @@ mod tests {
     }
 
     #[test]
-    #[should_fail]
+    #[should_panic]
     fn dont_panic_in_drop_on_panicked_flush() {
         struct FailFlushWriter;
 
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 0ed6d07bf79..be0b3687bad 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -16,7 +16,7 @@ use cmp;
 use unicode::str as core_str;
 use error as std_error;
 use fmt;
-use iter::{self, Iterator, IteratorExt, Extend};
+use iter::{self, Iterator, Extend};
 use marker::Sized;
 use ops::{Drop, FnOnce};
 use option::Option::{self, Some, None};
@@ -609,8 +609,7 @@ pub trait BufRead: Read {
     ///
     /// This function will yield errors whenever `read_until` would have also
     /// yielded an error.
-    #[unstable(feature = "io", reason = "may be renamed to not conflict with \
-                                         SliceExt::split")]
+    #[stable(feature = "rust1", since = "1.0.0")]
     fn split(self, byte: u8) -> Split<Self> where Self: Sized {
         Split { buf: self, delim: byte }
     }
@@ -854,13 +853,13 @@ impl fmt::Display for CharsError {
 /// particular byte.
 ///
 /// See `BufReadExt::split` for more information.
-#[unstable(feature = "io", reason = "awaiting stability of BufReadExt::split")]
+#[stable(feature = "rust1", since = "1.0.0")]
 pub struct Split<B> {
     buf: B,
     delim: u8,
 }
 
-#[unstable(feature = "io", reason = "awaiting stability of BufReadExt::split")]
+#[stable(feature = "rust1", since = "1.0.0")]
 impl<B: BufRead> Iterator for Split<B> {
     type Item = Result<Vec<u8>>;
 
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index 53f67766ea6..d361f17cbe4 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -11,7 +11,7 @@
 use prelude::v1::*;
 use io::prelude::*;
 
-use cell::RefCell;
+use cell::{RefCell, BorrowState};
 use cmp;
 use fmt;
 use io::lazy::Lazy;
@@ -264,9 +264,8 @@ impl Write for Stdout {
     fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
         self.lock().write_all(buf)
     }
-    fn write_fmt(&mut self, fmt: fmt::Arguments) -> io::Result<()> {
-        self.lock().write_fmt(fmt)
-    }
+    // Don't override write_fmt as it's possible to run arbitrary code during a
+    // write_fmt, allowing the possibility of a recursive lock (aka deadlock)
 }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a> Write for StdoutLock<'a> {
@@ -334,9 +333,7 @@ impl Write for Stderr {
     fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
         self.lock().write_all(buf)
     }
-    fn write_fmt(&mut self, fmt: fmt::Arguments) -> io::Result<()> {
-        self.lock().write_fmt(fmt)
-    }
+    // Don't override write_fmt for the same reasons as Stdout
 }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a> Write for StderrLock<'a> {
@@ -395,10 +392,15 @@ pub fn set_print(sink: Box<Write + Send>) -> Option<Box<Write + Send>> {
            reason = "implementation detail which may disappear or be replaced at any time")]
 #[doc(hidden)]
 pub fn _print(args: fmt::Arguments) {
-    if let Err(e) = LOCAL_STDOUT.with(|s| match s.borrow_mut().as_mut() {
-        Some(w) => w.write_fmt(args),
-        None => stdout().write_fmt(args)
-    }) {
+    let result = LOCAL_STDOUT.with(|s| {
+        if s.borrow_state() == BorrowState::Unused {
+            if let Some(w) = s.borrow_mut().as_mut() {
+                return w.write_fmt(args);
+            }
+        }
+        stdout().write_fmt(args)
+    });
+    if let Err(e) = result {
         panic!("failed printing to stdout: {}", e);
     }
 }
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 7eb575a3a68..b7cb8f9ed50 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -67,9 +67,8 @@
 //! module encapsulates the platform-specific rules for dealing
 //! with file paths.
 //!
-//! `std` also includes modules for interoperating with the
-//! C language: [`c_str`](c_str/index.html) and
-//! [`c_vec`](c_vec/index.html).
+//! `std` also includes the [`ffi`](ffi/index.html) module for interoperating
+//! with the C language.
 //!
 //! ## Concurrency, I/O, and the runtime
 //!
@@ -114,21 +113,22 @@
 #![feature(lang_items)]
 #![feature(libc)]
 #![feature(linkage, thread_local, asm)]
-#![feature(old_impl_check)]
 #![feature(optin_builtin_traits)]
 #![feature(rand)]
 #![feature(staged_api)]
 #![feature(unboxed_closures)]
 #![feature(unicode)]
 #![feature(unsafe_destructor)]
-#![feature(unsafe_no_drop_flag)]
+#![feature(unsafe_no_drop_flag, filling_drop)]
 #![feature(macro_reexport)]
-#![feature(int_uint)]
 #![feature(unique)]
 #![feature(convert)]
 #![feature(allow_internal_unstable)]
 #![feature(str_char)]
 #![feature(into_cow)]
+#![feature(slice_patterns)]
+#![feature(std_misc)]
+#![feature(debug_builders)]
 #![cfg_attr(test, feature(test, rustc_private, std_misc))]
 
 // Don't link to std. We are std.
@@ -136,7 +136,6 @@
 #![no_std]
 
 #![allow(trivial_casts)]
-#![allow(trivial_numeric_casts)]
 #![deny(missing_docs)]
 
 #[cfg(test)] extern crate test;
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 1681ed4282f..52492a019a2 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -28,7 +28,7 @@
 ///
 /// # Examples
 ///
-/// ```should_fail
+/// ```should_panic
 /// # #![allow(unreachable_code)]
 /// panic!();
 /// panic!("this is a terrible mistake!");
diff --git a/src/libstd/net/parser.rs b/src/libstd/net/parser.rs
index e7509834c7b..7c1667a603f 100644
--- a/src/libstd/net/parser.rs
+++ b/src/libstd/net/parser.rs
@@ -16,7 +16,7 @@
 use prelude::v1::*;
 
 use str::FromStr;
-use net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
+use net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
 
 struct Parser<'a> {
     // parsing as ASCII, so can use byte array
@@ -24,11 +24,6 @@ struct Parser<'a> {
     pos: usize,
 }
 
-enum IpAddr {
-    V4(Ipv4Addr),
-    V6(Ipv6Addr),
-}
-
 impl<'a> Parser<'a> {
     fn new(s: &'a str) -> Parser<'a> {
         Parser {
@@ -296,6 +291,17 @@ impl<'a> Parser<'a> {
     }
 }
 
+#[unstable(feature = "ip_addr", reason = "recent addition")]
+impl FromStr for IpAddr {
+    type Err = AddrParseError;
+    fn from_str(s: &str) -> Result<IpAddr, AddrParseError> {
+        match Parser::new(s).read_till_eof(|p| p.read_ip_addr()) {
+            Some(s) => Ok(s),
+            None => Err(AddrParseError(()))
+        }
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl FromStr for Ipv4Addr {
     type Err = AddrParseError;
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index a4f06f14d49..dc1d53b8a39 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -91,27 +91,27 @@ impl Float for f32 {
 
     #[allow(deprecated)]
     #[inline]
-    fn mantissa_digits(unused_self: Option<f32>) -> uint {
+    fn mantissa_digits(unused_self: Option<f32>) -> usize {
         num::Float::mantissa_digits(unused_self)
     }
     #[allow(deprecated)]
     #[inline]
-    fn digits(unused_self: Option<f32>) -> uint { num::Float::digits(unused_self) }
+    fn digits(unused_self: Option<f32>) -> usize { num::Float::digits(unused_self) }
     #[allow(deprecated)]
     #[inline]
     fn epsilon() -> f32 { num::Float::epsilon() }
     #[allow(deprecated)]
     #[inline]
-    fn min_exp(unused_self: Option<f32>) -> int { num::Float::min_exp(unused_self) }
+    fn min_exp(unused_self: Option<f32>) -> isize { num::Float::min_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn max_exp(unused_self: Option<f32>) -> int { num::Float::max_exp(unused_self) }
+    fn max_exp(unused_self: Option<f32>) -> isize { num::Float::max_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn min_10_exp(unused_self: Option<f32>) -> int { num::Float::min_10_exp(unused_self) }
+    fn min_10_exp(unused_self: Option<f32>) -> isize { num::Float::min_10_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn max_10_exp(unused_self: Option<f32>) -> int { num::Float::max_10_exp(unused_self) }
+    fn max_10_exp(unused_self: Option<f32>) -> isize { num::Float::max_10_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
     fn min_value() -> f32 { num::Float::min_value() }
@@ -201,11 +201,11 @@ impl Float for f32 {
     /// - `self = x * pow(2, exp)`
     /// - `0.5 <= abs(x) < 1.0`
     #[inline]
-    fn frexp(self) -> (f32, int) {
+    fn frexp(self) -> (f32, isize) {
         unsafe {
             let mut exp = 0;
             let x = cmath::frexpf(self, &mut exp);
-            (x, exp as int)
+            (x, exp as isize)
         }
     }
 
@@ -476,7 +476,7 @@ impl f32 {
                            `std::f64::MANTISSA_DIGITS` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn mantissa_digits(unused_self: Option<f32>) -> uint {
+    pub fn mantissa_digits(unused_self: Option<f32>) -> usize {
         num::Float::mantissa_digits(unused_self)
     }
 
@@ -486,7 +486,7 @@ impl f32 {
                  reason = "use `std::f32::DIGITS` or `std::f64::DIGITS` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn digits(unused_self: Option<f32>) -> uint { num::Float::digits(unused_self) }
+    pub fn digits(unused_self: Option<f32>) -> usize { num::Float::digits(unused_self) }
 
     /// Deprecated: use `std::f32::EPSILON` or `std::f64::EPSILON` instead.
     #[unstable(feature = "std_misc")]
@@ -502,7 +502,7 @@ impl f32 {
                  reason = "use `std::f32::MIN_EXP` or `std::f64::MIN_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn min_exp(unused_self: Option<f32>) -> int { num::Float::min_exp(unused_self) }
+    pub fn min_exp(unused_self: Option<f32>) -> isize { num::Float::min_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -510,7 +510,7 @@ impl f32 {
                  reason = "use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn max_exp(unused_self: Option<f32>) -> int { num::Float::max_exp(unused_self) }
+    pub fn max_exp(unused_self: Option<f32>) -> isize { num::Float::max_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -518,7 +518,7 @@ impl f32 {
                  reason = "use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn min_10_exp(unused_self: Option<f32>) -> int { num::Float::min_10_exp(unused_self) }
+    pub fn min_10_exp(unused_self: Option<f32>) -> isize { num::Float::min_10_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -526,7 +526,7 @@ impl f32 {
                  reason = "use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn max_10_exp(unused_self: Option<f32>) -> int { num::Float::max_10_exp(unused_self) }
+    pub fn max_10_exp(unused_self: Option<f32>) -> isize { num::Float::max_10_exp(unused_self) }
 
     /// Returns the smallest finite value that this type can represent.
     ///
@@ -1126,7 +1126,7 @@ impl f32 {
     #[unstable(feature = "std_misc",
                reason = "pending integer conventions")]
     #[inline]
-    pub fn ldexp(x: f32, exp: int) -> f32 {
+    pub fn ldexp(x: f32, exp: isize) -> f32 {
         unsafe { cmath::ldexpf(x, exp as c_int) }
     }
 
@@ -1153,11 +1153,11 @@ impl f32 {
     #[unstable(feature = "std_misc",
                reason = "pending integer conventions")]
     #[inline]
-    pub fn frexp(self) -> (f32, int) {
+    pub fn frexp(self) -> (f32, isize) {
         unsafe {
             let mut exp = 0;
             let x = cmath::frexpf(self, &mut exp);
-            (x, exp as int)
+            (x, exp as isize)
         }
     }
 
@@ -1681,7 +1681,7 @@ pub fn to_str_radix_special(num: f32, rdx: u32) -> (String, bool) {
 /// * digits - The number of significant digits
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exact(num: f32, dig: uint) -> String {
+pub fn to_str_exact(num: f32, dig: usize) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigExact(dig), ExpNone, false);
     r
@@ -1696,7 +1696,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> String {
 /// * digits - The number of significant digits
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_digits(num: f32, dig: uint) -> String {
+pub fn to_str_digits(num: f32, dig: usize) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigMax(dig), ExpNone, false);
     r
@@ -1712,7 +1712,7 @@ pub fn to_str_digits(num: f32, dig: uint) -> String {
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
+pub fn to_str_exp_exact(num: f32, dig: usize, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigExact(dig), ExpDec, upper);
     r
@@ -1728,7 +1728,7 @@ pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String {
+pub fn to_str_exp_digits(num: f32, dig: usize, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigMax(dig), ExpDec, upper);
     r
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index 9306804d1f7..41ce9a2598c 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -101,27 +101,27 @@ impl Float for f64 {
 
     #[allow(deprecated)]
     #[inline]
-    fn mantissa_digits(unused_self: Option<f64>) -> uint {
+    fn mantissa_digits(unused_self: Option<f64>) -> usize {
         num::Float::mantissa_digits(unused_self)
     }
     #[allow(deprecated)]
     #[inline]
-    fn digits(unused_self: Option<f64>) -> uint { num::Float::digits(unused_self) }
+    fn digits(unused_self: Option<f64>) -> usize { num::Float::digits(unused_self) }
     #[allow(deprecated)]
     #[inline]
     fn epsilon() -> f64 { num::Float::epsilon() }
     #[allow(deprecated)]
     #[inline]
-    fn min_exp(unused_self: Option<f64>) -> int { num::Float::min_exp(unused_self) }
+    fn min_exp(unused_self: Option<f64>) -> isize { num::Float::min_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn max_exp(unused_self: Option<f64>) -> int { num::Float::max_exp(unused_self) }
+    fn max_exp(unused_self: Option<f64>) -> isize { num::Float::max_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn min_10_exp(unused_self: Option<f64>) -> int { num::Float::min_10_exp(unused_self) }
+    fn min_10_exp(unused_self: Option<f64>) -> isize { num::Float::min_10_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
-    fn max_10_exp(unused_self: Option<f64>) -> int { num::Float::max_10_exp(unused_self) }
+    fn max_10_exp(unused_self: Option<f64>) -> isize { num::Float::max_10_exp(unused_self) }
     #[allow(deprecated)]
     #[inline]
     fn min_value() -> f64 { num::Float::min_value() }
@@ -210,11 +210,11 @@ impl Float for f64 {
     /// - `self = x * pow(2, exp)`
     /// - `0.5 <= abs(x) < 1.0`
     #[inline]
-    fn frexp(self) -> (f64, int) {
+    fn frexp(self) -> (f64, isize) {
         unsafe {
             let mut exp = 0;
             let x = cmath::frexp(self, &mut exp);
-            (x, exp as int)
+            (x, exp as isize)
         }
     }
 
@@ -485,7 +485,7 @@ impl f64 {
                            `std::f64::MANTISSA_DIGITS` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn mantissa_digits(unused_self: Option<f64>) -> uint {
+    pub fn mantissa_digits(unused_self: Option<f64>) -> usize {
         num::Float::mantissa_digits(unused_self)
     }
 
@@ -495,7 +495,7 @@ impl f64 {
                  reason = "use `std::f32::DIGITS` or `std::f64::DIGITS` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn digits(unused_self: Option<f64>) -> uint { num::Float::digits(unused_self) }
+    pub fn digits(unused_self: Option<f64>) -> usize { num::Float::digits(unused_self) }
 
     /// Deprecated: use `std::f32::EPSILON` or `std::f64::EPSILON` instead.
     #[unstable(feature = "std_misc")]
@@ -511,7 +511,7 @@ impl f64 {
                  reason = "use `std::f32::MIN_EXP` or `std::f64::MIN_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn min_exp(unused_self: Option<f64>) -> int { num::Float::min_exp(unused_self) }
+    pub fn min_exp(unused_self: Option<f64>) -> isize { num::Float::min_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -519,7 +519,7 @@ impl f64 {
                  reason = "use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn max_exp(unused_self: Option<f64>) -> int { num::Float::max_exp(unused_self) }
+    pub fn max_exp(unused_self: Option<f64>) -> isize { num::Float::max_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -527,7 +527,7 @@ impl f64 {
                  reason = "use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn min_10_exp(unused_self: Option<f64>) -> int { num::Float::min_10_exp(unused_self) }
+    pub fn min_10_exp(unused_self: Option<f64>) -> isize { num::Float::min_10_exp(unused_self) }
 
     /// Deprecated: use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` instead.
     #[unstable(feature = "std_misc")]
@@ -535,7 +535,7 @@ impl f64 {
                  reason = "use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` as appropriate")]
     #[allow(deprecated)]
     #[inline]
-    pub fn max_10_exp(unused_self: Option<f64>) -> int { num::Float::max_10_exp(unused_self) }
+    pub fn max_10_exp(unused_self: Option<f64>) -> isize { num::Float::max_10_exp(unused_self) }
 
     /// Returns the smallest finite value that this type can represent.
     ///
@@ -1134,7 +1134,7 @@ impl f64 {
     #[unstable(feature = "std_misc",
                reason = "pending integer conventions")]
     #[inline]
-    pub fn ldexp(x: f64, exp: int) -> f64 {
+    pub fn ldexp(x: f64, exp: isize) -> f64 {
         unsafe { cmath::ldexp(x, exp as c_int) }
     }
 
@@ -1161,11 +1161,11 @@ impl f64 {
     #[unstable(feature = "std_misc",
                reason = "pending integer conventions")]
     #[inline]
-    pub fn frexp(self) -> (f64, int) {
+    pub fn frexp(self) -> (f64, isize) {
         unsafe {
             let mut exp = 0;
             let x = cmath::frexp(self, &mut exp);
-            (x, exp as int)
+            (x, exp as isize)
         }
     }
 
@@ -1687,7 +1687,7 @@ pub fn to_str_radix_special(num: f64, rdx: u32) -> (String, bool) {
 /// * digits - The number of significant digits
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exact(num: f64, dig: uint) -> String {
+pub fn to_str_exact(num: f64, dig: usize) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigExact(dig), ExpNone, false);
     r
@@ -1702,7 +1702,7 @@ pub fn to_str_exact(num: f64, dig: uint) -> String {
 /// * digits - The number of significant digits
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_digits(num: f64, dig: uint) -> String {
+pub fn to_str_digits(num: f64, dig: usize) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigMax(dig), ExpNone, false);
     r
@@ -1718,7 +1718,7 @@ pub fn to_str_digits(num: f64, dig: uint) -> String {
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
+pub fn to_str_exp_exact(num: f64, dig: usize, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigExact(dig), ExpDec, upper);
     r
@@ -1734,7 +1734,7 @@ pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
 #[unstable(feature = "std_misc", reason = "may be removed or relocated")]
-pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String {
+pub fn to_str_exp_digits(num: f64, dig: usize, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10, true, SignNeg, DigMax(dig), ExpDec, upper);
     r
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 66826b359e6..1c1aaeb6d53 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -49,10 +49,10 @@ pub enum SignificantDigits {
 
     /// At most the given number of digits will be printed, truncating any
     /// trailing zeroes.
-    DigMax(uint),
+    DigMax(usize),
 
     /// Precisely the given number of digits will be printed.
-    DigExact(uint)
+    DigExact(usize)
 }
 
 /// How to emit the sign of a number.
@@ -87,7 +87,7 @@ pub enum SignFormat {
 /// # Panics
 ///
 /// - Panics if `radix` < 2 or `radix` > 36.
-fn int_to_str_bytes_common<T, F>(num: T, radix: uint, sign: SignFormat, mut f: F) where
+fn int_to_str_bytes_common<T, F>(num: T, radix: usize, sign: SignFormat, mut f: F) where
     T: Int,
     F: FnMut(u8),
 {
@@ -216,7 +216,7 @@ pub fn float_to_str_bytes_common<T: Float>(
 
     let neg = num < _0 || (negative_zero && _1 / num == Float::neg_infinity());
     let mut buf = Vec::new();
-    let radix_gen: T = num::cast(radix as int).unwrap();
+    let radix_gen: T = num::cast(radix as isize).unwrap();
 
     let (num, exp) = match exp_format {
         ExpNone => (num, 0),
@@ -328,28 +328,28 @@ pub fn float_to_str_bytes_common<T: Float>(
 
             let extra_digit = ascii2value(buf.pop().unwrap());
             if extra_digit >= radix / 2 { // -> need to round
-                let mut i: int = buf.len() as int - 1;
+                let mut i: isize = buf.len() as isize - 1;
                 loop {
                     // If reached left end of number, have to
                     // insert additional digit:
                     if i < 0
-                    || buf[i as uint] == b'-'
-                    || buf[i as uint] == b'+' {
-                        buf.insert((i + 1) as uint, value2ascii(1));
+                    || buf[i as usize] == b'-'
+                    || buf[i as usize] == b'+' {
+                        buf.insert((i + 1) as usize, value2ascii(1));
                         break;
                     }
 
                     // Skip the '.'
-                    if buf[i as uint] == b'.' { i -= 1; continue; }
+                    if buf[i as usize] == b'.' { i -= 1; continue; }
 
                     // Either increment the digit,
                     // or set to 0 if max and carry the 1.
-                    let current_digit = ascii2value(buf[i as uint]);
+                    let current_digit = ascii2value(buf[i as usize]);
                     if current_digit < (radix - 1) {
-                        buf[i as uint] = value2ascii(current_digit+1);
+                        buf[i as usize] = value2ascii(current_digit+1);
                         break;
                     } else {
-                        buf[i as uint] = value2ascii(0);
+                        buf[i as usize] = value2ascii(0);
                         i -= 1;
                     }
                 }
@@ -461,85 +461,85 @@ mod bench {
     #![allow(deprecated)] // rand
     extern crate test;
 
-    mod uint {
+    mod usize {
         use super::test::Bencher;
         use rand::{weak_rng, Rng};
         use std::fmt;
 
         #[inline]
-        fn to_string(x: uint, base: u8) {
+        fn to_string(x: usize, base: u8) {
             format!("{}", fmt::radix(x, base));
         }
 
         #[bench]
         fn to_str_bin(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<uint>(), 2); })
+            b.iter(|| { to_string(rng.gen::<usize>(), 2); })
         }
 
         #[bench]
         fn to_str_oct(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<uint>(), 8); })
+            b.iter(|| { to_string(rng.gen::<usize>(), 8); })
         }
 
         #[bench]
         fn to_str_dec(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<uint>(), 10); })
+            b.iter(|| { to_string(rng.gen::<usize>(), 10); })
         }
 
         #[bench]
         fn to_str_hex(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<uint>(), 16); })
+            b.iter(|| { to_string(rng.gen::<usize>(), 16); })
         }
 
         #[bench]
         fn to_str_base_36(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<uint>(), 36); })
+            b.iter(|| { to_string(rng.gen::<usize>(), 36); })
         }
     }
 
-    mod int {
+    mod isize {
         use super::test::Bencher;
         use rand::{weak_rng, Rng};
         use std::fmt;
 
         #[inline]
-        fn to_string(x: int, base: u8) {
+        fn to_string(x: isize, base: u8) {
             format!("{}", fmt::radix(x, base));
         }
 
         #[bench]
         fn to_str_bin(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<int>(), 2); })
+            b.iter(|| { to_string(rng.gen::<isize>(), 2); })
         }
 
         #[bench]
         fn to_str_oct(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<int>(), 8); })
+            b.iter(|| { to_string(rng.gen::<isize>(), 8); })
         }
 
         #[bench]
         fn to_str_dec(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<int>(), 10); })
+            b.iter(|| { to_string(rng.gen::<isize>(), 10); })
         }
 
         #[bench]
         fn to_str_hex(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<int>(), 16); })
+            b.iter(|| { to_string(rng.gen::<isize>(), 16); })
         }
 
         #[bench]
         fn to_str_base_36(b: &mut Bencher) {
             let mut rng = weak_rng();
-            b.iter(|| { to_string(rng.gen::<int>(), 36); })
+            b.iter(|| { to_string(rng.gen::<isize>(), 36); })
         }
     }
 
diff --git a/src/libstd/old_io/buffered.rs b/src/libstd/old_io/buffered.rs
index 9c42fbf5c16..b8b7df75003 100644
--- a/src/libstd/old_io/buffered.rs
+++ b/src/libstd/old_io/buffered.rs
@@ -15,7 +15,7 @@
 use cmp;
 use fmt;
 use old_io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult};
-use iter::{IteratorExt, ExactSizeIterator, repeat};
+use iter::{Iterator, ExactSizeIterator, repeat};
 use ops::Drop;
 use option::Option;
 use option::Option::{Some, None};
@@ -49,8 +49,8 @@ use vec::Vec;
 pub struct BufferedReader<R> {
     inner: R,
     buf: Vec<u8>,
-    pos: uint,
-    cap: uint,
+    pos: usize,
+    cap: usize,
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -63,7 +63,7 @@ impl<R> fmt::Debug for BufferedReader<R> where R: fmt::Debug {
 
 impl<R: Reader> BufferedReader<R> {
     /// Creates a new `BufferedReader` with the specified buffer capacity
-    pub fn with_capacity(cap: uint, inner: R) -> BufferedReader<R> {
+    pub fn with_capacity(cap: usize, inner: R) -> BufferedReader<R> {
         BufferedReader {
             inner: inner,
             // We can't use the same trick here as we do for BufferedWriter,
@@ -104,14 +104,14 @@ impl<R: Reader> Buffer for BufferedReader<R> {
         Ok(&self.buf[self.pos..self.cap])
     }
 
-    fn consume(&mut self, amt: uint) {
+    fn consume(&mut self, amt: usize) {
         self.pos += amt;
         assert!(self.pos <= self.cap);
     }
 }
 
 impl<R: Reader> Reader for BufferedReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         if self.pos == self.cap && buf.len() >= self.buf.len() {
             return self.inner.read(buf);
         }
@@ -151,7 +151,7 @@ impl<R: Reader> Reader for BufferedReader<R> {
 pub struct BufferedWriter<W: Writer> {
     inner: Option<W>,
     buf: Vec<u8>,
-    pos: uint
+    pos: usize
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -164,7 +164,7 @@ impl<W: Writer> fmt::Debug for BufferedWriter<W> where W: fmt::Debug {
 
 impl<W: Writer> BufferedWriter<W> {
     /// Creates a new `BufferedWriter` with the specified buffer capacity
-    pub fn with_capacity(cap: uint, inner: W) -> BufferedWriter<W> {
+    pub fn with_capacity(cap: usize, inner: W) -> BufferedWriter<W> {
         // It's *much* faster to create an uninitialized buffer than it is to
         // fill everything in with 0. This buffer is entirely an implementation
         // detail and is never exposed, so we're safe to not initialize
@@ -309,7 +309,7 @@ impl<W: Writer> InternalBufferedWriter<W> {
 }
 
 impl<W: Reader + Writer> Reader for InternalBufferedWriter<W> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.get_mut().inner.as_mut().unwrap().read(buf)
     }
 }
@@ -362,7 +362,7 @@ impl<S: Writer> fmt::Debug for BufferedStream<S> where S: fmt::Debug {
 impl<S: Stream> BufferedStream<S> {
     /// Creates a new buffered stream with explicitly listed capacities for the
     /// reader/writer buffer.
-    pub fn with_capacities(reader_cap: uint, writer_cap: uint, inner: S)
+    pub fn with_capacities(reader_cap: usize, writer_cap: usize, inner: S)
                            -> BufferedStream<S> {
         let writer = BufferedWriter::with_capacity(writer_cap, inner);
         let internal_writer = InternalBufferedWriter(writer);
@@ -407,11 +407,11 @@ impl<S: Stream> BufferedStream<S> {
 
 impl<S: Stream> Buffer for BufferedStream<S> {
     fn fill_buf<'a>(&'a mut self) -> IoResult<&'a [u8]> { self.inner.fill_buf() }
-    fn consume(&mut self, amt: uint) { self.inner.consume(amt) }
+    fn consume(&mut self, amt: usize) { self.inner.consume(amt) }
 }
 
 impl<S: Stream> Reader for BufferedStream<S> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.read(buf)
     }
 }
@@ -442,7 +442,7 @@ mod test {
     pub struct NullStream;
 
     impl Reader for NullStream {
-        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<usize> {
             Err(old_io::standard_error(old_io::EndOfFile))
         }
     }
@@ -453,11 +453,11 @@ mod test {
 
     /// A dummy reader intended at testing short-reads propagation.
     pub struct ShortReader {
-        lengths: Vec<uint>,
+        lengths: Vec<usize>,
     }
 
     impl Reader for ShortReader {
-        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<usize> {
             if self.lengths.is_empty() {
                 Err(old_io::standard_error(old_io::EndOfFile))
             } else {
@@ -565,7 +565,7 @@ mod test {
         }
 
         impl old_io::Reader for S {
-            fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<uint> {
+            fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<usize> {
                 Err(old_io::standard_error(old_io::EndOfFile))
             }
         }
diff --git a/src/libstd/old_io/comm_adapters.rs b/src/libstd/old_io/comm_adapters.rs
index cd8252540da..35bc58fecd2 100644
--- a/src/libstd/old_io/comm_adapters.rs
+++ b/src/libstd/old_io/comm_adapters.rs
@@ -39,7 +39,7 @@ use vec::Vec;
 /// ```
 pub struct ChanReader {
     buf: Vec<u8>,          // A buffer of bytes received but not consumed.
-    pos: uint,             // How many of the buffered bytes have already be consumed.
+    pos: usize,             // How many of the buffered bytes have already be consumed.
     rx: Receiver<Vec<u8>>, // The Receiver to pull data from.
     closed: bool,          // Whether the channel this Receiver connects to has been closed.
 }
@@ -77,14 +77,14 @@ impl Buffer for ChanReader {
         }
     }
 
-    fn consume(&mut self, amt: uint) {
+    fn consume(&mut self, amt: usize) {
         self.pos += amt;
         assert!(self.pos <= self.buf.len());
     }
 }
 
 impl Reader for ChanReader {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         let mut num_read = 0;
         loop {
             let count = match self.fill_buf().ok() {
diff --git a/src/libstd/old_io/extensions.rs b/src/libstd/old_io/extensions.rs
index 5b1b9471b07..441f0a7536e 100644
--- a/src/libstd/old_io/extensions.rs
+++ b/src/libstd/old_io/extensions.rs
@@ -81,7 +81,7 @@ impl<'r, R: Reader> Iterator for Bytes<'r, R> {
 /// * `f`: A callback that receives the value.
 ///
 /// This function returns the value returned by the callback, for convenience.
-pub fn u64_to_le_bytes<T, F>(n: u64, size: uint, f: F) -> T where
+pub fn u64_to_le_bytes<T, F>(n: u64, size: usize, f: F) -> T where
     F: FnOnce(&[u8]) -> T,
 {
     use mem::transmute;
@@ -122,7 +122,7 @@ pub fn u64_to_le_bytes<T, F>(n: u64, size: uint, f: F) -> T where
 /// * `f`: A callback that receives the value.
 ///
 /// This function returns the value returned by the callback, for convenience.
-pub fn u64_to_be_bytes<T, F>(n: u64, size: uint, f: F) -> T where
+pub fn u64_to_be_bytes<T, F>(n: u64, size: usize, f: F) -> T where
     F: FnOnce(&[u8]) -> T,
 {
     use mem::transmute;
@@ -158,7 +158,7 @@ pub fn u64_to_be_bytes<T, F>(n: u64, size: uint, f: F) -> T where
 ///           less, or task panic occurs. If this is less than 8, then only
 ///           that many bytes are parsed. For example, if `size` is 4, then a
 ///           32-bit value is parsed.
-pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 {
+pub fn u64_from_be_bytes(data: &[u8], start: usize, size: usize) -> u64 {
     use ptr::{copy_nonoverlapping};
 
     assert!(size <= 8);
@@ -169,9 +169,9 @@ pub fn u64_from_be_bytes(data: &[u8], start: uint, size: uint) -> u64 {
 
     let mut buf = [0; 8];
     unsafe {
-        let ptr = data.as_ptr().offset(start as int);
+        let ptr = data.as_ptr().offset(start as isize);
         let out = buf.as_mut_ptr();
-        copy_nonoverlapping(out.offset((8 - size) as int), ptr, size);
+        copy_nonoverlapping(out.offset((8 - size) as isize), ptr, size);
         (*(out as *const u64)).to_be()
     }
 }
@@ -183,11 +183,11 @@ mod test {
     use old_io::{MemReader, BytesReader};
 
     struct InitialZeroByteReader {
-        count: int,
+        count: isize,
     }
 
     impl Reader for InitialZeroByteReader {
-        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
             if self.count == 0 {
                 self.count = 1;
                 Ok(0)
@@ -201,7 +201,7 @@ mod test {
     struct EofReader;
 
     impl Reader for EofReader {
-        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<usize> {
             Err(old_io::standard_error(old_io::EndOfFile))
         }
     }
@@ -209,17 +209,17 @@ mod test {
     struct ErroringReader;
 
     impl Reader for ErroringReader {
-        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, _: &mut [u8]) -> old_io::IoResult<usize> {
             Err(old_io::standard_error(old_io::InvalidInput))
         }
     }
 
     struct PartialReader {
-        count: int,
+        count: isize,
     }
 
     impl Reader for PartialReader {
-        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
             if self.count == 0 {
                 self.count = 1;
                 buf[0] = 10;
@@ -234,11 +234,11 @@ mod test {
     }
 
     struct ErroringLaterReader {
-        count: int,
+        count: isize,
     }
 
     impl Reader for ErroringLaterReader {
-        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
             if self.count == 0 {
                 self.count = 1;
                 buf[0] = 10;
@@ -250,11 +250,11 @@ mod test {
     }
 
     struct ThreeChunkReader {
-        count: int,
+        count: isize,
     }
 
     impl Reader for ThreeChunkReader {
-        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+        fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
             if self.count == 0 {
                 self.count = 1;
                 buf[0] = 10;
diff --git a/src/libstd/old_io/fs.rs b/src/libstd/old_io/fs.rs
index 40a7cce81dd..e47c1b238eb 100644
--- a/src/libstd/old_io/fs.rs
+++ b/src/libstd/old_io/fs.rs
@@ -88,7 +88,7 @@ use sys_common;
 pub struct File {
     fd: fs_imp::FileDesc,
     path: Path,
-    last_nread: int,
+    last_nread: isize,
 }
 
 impl sys_common::AsInner<fs_imp::FileDesc> for File {
@@ -105,7 +105,7 @@ impl File {
     ///
     /// # Examples
     ///
-    /// ```rust,should_fail
+    /// ```rust,should_panic
     /// # #![feature(old_io, old_path)]
     /// use std::old_io::*;
     /// use std::old_path::Path;
@@ -472,14 +472,14 @@ pub fn copy(from: &Path, to: &Path) -> IoResult<()> {
 #[deprecated(since = "1.0.0", reason = "replaced with std::fs::set_permissions")]
 #[unstable(feature = "old_io")]
 pub fn chmod(path: &Path, mode: old_io::FilePermission) -> IoResult<()> {
-    fs_imp::chmod(path, mode.bits() as uint)
+    fs_imp::chmod(path, mode.bits() as usize)
            .update_err("couldn't chmod path", |e|
                format!("{}; path={}; mode={:?}", e, path.display(), mode))
 }
 
 /// Change the user and group owners of a file at the specified path.
 #[unstable(feature = "old_fs")]
-pub fn chown(path: &Path, uid: int, gid: int) -> IoResult<()> {
+pub fn chown(path: &Path, uid: isize, gid: isize) -> IoResult<()> {
     fs_imp::chown(path, uid, gid)
            .update_err("couldn't chown path", |e|
                format!("{}; path={}; uid={}; gid={}", e, path.display(), uid, gid))
@@ -541,7 +541,7 @@ pub fn readlink(path: &Path) -> IoResult<Path> {
 /// new directory at the provided `path`, or if the directory already exists.
 #[unstable(feature = "old_fs")]
 pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> {
-    fs_imp::mkdir(path, mode.bits() as uint)
+    fs_imp::mkdir(path, mode.bits() as usize)
            .update_err("couldn't create directory", |e|
                format!("{}; path={}; mode={}", e, path.display(), mode))
 }
@@ -773,7 +773,7 @@ pub fn change_file_times(path: &Path, atime: u64, mtime: u64) -> IoResult<()> {
 }
 
 impl Reader for File {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         fn update_err<T>(result: IoResult<T>, file: &File) -> IoResult<T> {
             result.update_err("couldn't read file",
                               |e| format!("{}; path={}",
@@ -784,10 +784,10 @@ impl Reader for File {
 
         match result {
             Ok(read) => {
-                self.last_nread = read as int;
+                self.last_nread = read as isize;
                 match read {
                     0 => update_err(Err(standard_error(old_io::EndOfFile)), self),
-                    _ => Ok(read as uint)
+                    _ => Ok(read as usize)
                 }
             },
             Err(e) => Err(e)
@@ -1227,8 +1227,8 @@ mod test {
             let stem = f.filestem_str().unwrap();
             let root = stem.as_bytes()[0] - b'0';
             let name = stem.as_bytes()[1] - b'0';
-            assert!(cur[root as uint] < name);
-            cur[root as uint] = name;
+            assert!(cur[root as usize] < name);
+            cur[root as usize] = name;
         }
 
         check!(rmdir_recursive(dir));
diff --git a/src/libstd/old_io/mem.rs b/src/libstd/old_io/mem.rs
index 298085806bd..5f20c383bb7 100644
--- a/src/libstd/old_io/mem.rs
+++ b/src/libstd/old_io/mem.rs
@@ -20,9 +20,9 @@ use old_io::{Reader, Writer, Seek, Buffer, IoError, SeekStyle, IoResult};
 use slice;
 use vec::Vec;
 
-const BUF_CAPACITY: uint = 128;
+const BUF_CAPACITY: usize = 128;
 
-fn combine(seek: SeekStyle, cur: uint, end: uint, offset: i64) -> IoResult<u64> {
+fn combine(seek: SeekStyle, cur: usize, end: usize, offset: i64) -> IoResult<u64> {
     // compute offset as signed and clamp to prevent overflow
     let pos = match seek {
         old_io::SeekSet => 0,
@@ -82,7 +82,7 @@ impl MemWriter {
     /// Create a new `MemWriter`, allocating at least `n` bytes for
     /// the internal buffer.
     #[inline]
-    pub fn with_capacity(n: uint) -> MemWriter {
+    pub fn with_capacity(n: usize) -> MemWriter {
         MemWriter::from_vec(Vec::with_capacity(n))
     }
     /// Create a new `MemWriter` that will append to an existing `Vec`.
@@ -125,7 +125,7 @@ impl Writer for MemWriter {
 /// ```
 pub struct MemReader {
     buf: Vec<u8>,
-    pos: uint
+    pos: usize
 }
 
 impl MemReader {
@@ -160,7 +160,7 @@ impl MemReader {
 
 impl Reader for MemReader {
     #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         if self.eof() { return Err(old_io::standard_error(old_io::EndOfFile)) }
 
         let write_len = min(buf.len(), self.buf.len() - self.pos);
@@ -184,7 +184,7 @@ impl Seek for MemReader {
     #[inline]
     fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> {
         let new = try!(combine(style, self.pos, self.buf.len(), pos));
-        self.pos = new as uint;
+        self.pos = new as usize;
         Ok(())
     }
 }
@@ -200,12 +200,12 @@ impl Buffer for MemReader {
     }
 
     #[inline]
-    fn consume(&mut self, amt: uint) { self.pos += amt; }
+    fn consume(&mut self, amt: usize) { self.pos += amt; }
 }
 
 impl<'a> Reader for &'a [u8] {
     #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         if self.is_empty() { return Err(old_io::standard_error(old_io::EndOfFile)); }
 
         let write_len = min(buf.len(), self.len());
@@ -232,7 +232,7 @@ impl<'a> Buffer for &'a [u8] {
     }
 
     #[inline]
-    fn consume(&mut self, amt: uint) {
+    fn consume(&mut self, amt: usize) {
         *self = &self[amt..];
     }
 }
@@ -259,7 +259,7 @@ impl<'a> Buffer for &'a [u8] {
 /// ```
 pub struct BufWriter<'a> {
     buf: &'a mut [u8],
-    pos: uint
+    pos: usize
 }
 
 impl<'a> BufWriter<'a> {
@@ -309,7 +309,7 @@ impl<'a> Seek for BufWriter<'a> {
     #[inline]
     fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> {
         let new = try!(combine(style, self.pos, self.buf.len(), pos));
-        self.pos = min(new as uint, self.buf.len());
+        self.pos = min(new as usize, self.buf.len());
         Ok(())
     }
 }
@@ -330,7 +330,7 @@ impl<'a> Seek for BufWriter<'a> {
 /// ```
 pub struct BufReader<'a> {
     buf: &'a [u8],
-    pos: uint
+    pos: usize
 }
 
 impl<'a> BufReader<'a> {
@@ -352,7 +352,7 @@ impl<'a> BufReader<'a> {
 
 impl<'a> Reader for BufReader<'a> {
     #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         if self.eof() { return Err(old_io::standard_error(old_io::EndOfFile)) }
 
         let write_len = min(buf.len(), self.buf.len() - self.pos);
@@ -376,7 +376,7 @@ impl<'a> Seek for BufReader<'a> {
     #[inline]
     fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> {
         let new = try!(combine(style, self.pos, self.buf.len(), pos));
-        self.pos = new as uint;
+        self.pos = new as usize;
         Ok(())
     }
 }
@@ -392,7 +392,7 @@ impl<'a> Buffer for BufReader<'a> {
     }
 
     #[inline]
-    fn consume(&mut self, amt: uint) { self.pos += amt; }
+    fn consume(&mut self, amt: usize) { self.pos += amt; }
 }
 
 #[cfg(test)]
@@ -400,7 +400,7 @@ mod test {
     extern crate test as test_crate;
     use old_io::{SeekSet, SeekCur, SeekEnd, Reader, Writer, Seek, Buffer};
     use prelude::v1::{Ok, Err, Vec,  AsSlice};
-    use prelude::v1::IteratorExt;
+    use prelude::v1::Iterator;
     use old_io;
     use iter::repeat;
     use self::test_crate::Bencher;
@@ -663,7 +663,7 @@ mod test {
         assert_eq!(buf, b);
     }
 
-    fn do_bench_mem_writer(b: &mut Bencher, times: uint, len: uint) {
+    fn do_bench_mem_writer(b: &mut Bencher, times: usize, len: usize) {
         let src: Vec<u8> = repeat(5).take(len).collect();
 
         b.bytes = (times * len) as u64;
diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs
index ac908c529dc..df8ac78f7e5 100644
--- a/src/libstd/old_io/mod.rs
+++ b/src/libstd/old_io/mod.rs
@@ -268,7 +268,7 @@ use default::Default;
 use error::Error;
 use fmt;
 use isize;
-use iter::{Iterator, IteratorExt};
+use iter::Iterator;
 use marker::{PhantomFn, Sized};
 use mem::transmute;
 use ops::FnOnce;
@@ -326,7 +326,7 @@ pub mod test;
 /// The default buffer size for various I/O operations
 // libuv recommends 64k buffers to maximize throughput
 // https://groups.google.com/forum/#!topic/libuv/oQO1HJAIDdA
-const DEFAULT_BUF_SIZE: uint = 1024 * 64;
+const DEFAULT_BUF_SIZE: usize = 1024 * 64;
 
 /// A convenient typedef of the return value of any I/O action.
 pub type IoResult<T> = Result<T, IoError>;
@@ -441,7 +441,7 @@ pub enum IoErrorKind {
     ///
     /// The payload contained as part of this variant is the number of bytes
     /// which are known to have been successfully written.
-    ShortWrite(uint),
+    ShortWrite(usize),
     /// The Reader returned 0 bytes from `read()` too many times.
     NoProgress,
 }
@@ -483,7 +483,7 @@ impl<T> UpdateIoError for IoResult<T> {
     }
 }
 
-static NO_PROGRESS_LIMIT: uint = 1000;
+static NO_PROGRESS_LIMIT: usize = 1000;
 
 /// A trait for objects which are byte-oriented streams. Readers are defined by
 /// one method, `read`. This function will block until data is available,
@@ -511,7 +511,7 @@ pub trait Reader {
     ///
     /// When implementing this method on a new Reader, you are strongly encouraged
     /// not to return 0 if you can avoid it.
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize>;
 
     // Convenient helper methods based on the above methods
 
@@ -526,7 +526,7 @@ pub trait Reader {
     ///
     /// If an error occurs at any point, that error is returned, and no further
     /// bytes are read.
-    fn read_at_least(&mut self, min: uint, buf: &mut [u8]) -> IoResult<uint> {
+    fn read_at_least(&mut self, min: usize, buf: &mut [u8]) -> IoResult<usize> {
         if min > buf.len() {
             return Err(IoError {
                 detail: Some(String::from_str("the buffer is too short")),
@@ -570,7 +570,7 @@ pub trait Reader {
     ///
     /// If an error occurs during this I/O operation, then it is returned
     /// as `Err(IoError)`. See `read()` for more details.
-    fn push(&mut self, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> {
+    fn push(&mut self, len: usize, buf: &mut Vec<u8>) -> IoResult<usize> {
         let start_len = buf.len();
         buf.reserve(len);
 
@@ -594,7 +594,7 @@ pub trait Reader {
     ///
     /// If an error occurs at any point, that error is returned, and no further
     /// bytes are read.
-    fn push_at_least(&mut self, min: uint, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> {
+    fn push_at_least(&mut self, min: usize, len: usize, buf: &mut Vec<u8>) -> IoResult<usize> {
         if min > len {
             return Err(IoError {
                 detail: Some(String::from_str("the buffer is too short")),
@@ -629,7 +629,7 @@ pub trait Reader {
     /// have already been consumed from the underlying reader, and they are lost
     /// (not returned as part of the error). If this is unacceptable, then it is
     /// recommended to use the `push_at_least` or `read` methods.
-    fn read_exact(&mut self, len: uint) -> IoResult<Vec<u8>> {
+    fn read_exact(&mut self, len: usize) -> IoResult<Vec<u8>> {
         let mut buf = Vec::with_capacity(len);
         match self.push_at_least(len, len, &mut buf) {
             Ok(_) => Ok(buf),
@@ -679,7 +679,7 @@ pub trait Reader {
     /// Reads `n` little-endian unsigned integer bytes.
     ///
     /// `n` must be between 1 and 8, inclusive.
-    fn read_le_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
+    fn read_le_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
         assert!(nbytes > 0 && nbytes <= 8);
 
         let mut val = 0;
@@ -696,14 +696,14 @@ pub trait Reader {
     /// Reads `n` little-endian signed integer bytes.
     ///
     /// `n` must be between 1 and 8, inclusive.
-    fn read_le_int_n(&mut self, nbytes: uint) -> IoResult<i64> {
+    fn read_le_int_n(&mut self, nbytes: usize) -> IoResult<i64> {
         self.read_le_uint_n(nbytes).map(|i| extend_sign(i, nbytes))
     }
 
     /// Reads `n` big-endian unsigned integer bytes.
     ///
     /// `n` must be between 1 and 8, inclusive.
-    fn read_be_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
+    fn read_be_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
         assert!(nbytes > 0 && nbytes <= 8);
 
         let mut val = 0;
@@ -718,36 +718,36 @@ pub trait Reader {
     /// Reads `n` big-endian signed integer bytes.
     ///
     /// `n` must be between 1 and 8, inclusive.
-    fn read_be_int_n(&mut self, nbytes: uint) -> IoResult<i64> {
+    fn read_be_int_n(&mut self, nbytes: usize) -> IoResult<i64> {
         self.read_be_uint_n(nbytes).map(|i| extend_sign(i, nbytes))
     }
 
     /// Reads a little-endian unsigned integer.
     ///
     /// The number of bytes returned is system-dependent.
-    fn read_le_uint(&mut self) -> IoResult<uint> {
-        self.read_le_uint_n(usize::BYTES as usize).map(|i| i as uint)
+    fn read_le_uint(&mut self) -> IoResult<usize> {
+        self.read_le_uint_n(usize::BYTES as usize).map(|i| i as usize)
     }
 
     /// Reads a little-endian integer.
     ///
     /// The number of bytes returned is system-dependent.
-    fn read_le_int(&mut self) -> IoResult<int> {
-        self.read_le_int_n(isize::BYTES as usize).map(|i| i as int)
+    fn read_le_int(&mut self) -> IoResult<isize> {
+        self.read_le_int_n(isize::BYTES as usize).map(|i| i as isize)
     }
 
     /// Reads a big-endian unsigned integer.
     ///
     /// The number of bytes returned is system-dependent.
-    fn read_be_uint(&mut self) -> IoResult<uint> {
-        self.read_be_uint_n(usize::BYTES as usize).map(|i| i as uint)
+    fn read_be_uint(&mut self) -> IoResult<usize> {
+        self.read_be_uint_n(usize::BYTES as usize).map(|i| i as usize)
     }
 
     /// Reads a big-endian integer.
     ///
     /// The number of bytes returned is system-dependent.
-    fn read_be_int(&mut self) -> IoResult<int> {
-        self.read_be_int_n(isize::BYTES as usize).map(|i| i as int)
+    fn read_be_int(&mut self) -> IoResult<isize> {
+        self.read_be_int_n(isize::BYTES as usize).map(|i| i as isize)
     }
 
     /// Reads a big-endian `u64`.
@@ -919,14 +919,14 @@ impl<T: Reader> BytesReader for T {
 }
 
 impl<'a> Reader for Box<Reader+'a> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         let reader: &mut Reader = &mut **self;
         reader.read(buf)
     }
 }
 
 impl<'a> Reader for &'a mut (Reader+'a) {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { (*self).read(buf) }
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> { (*self).read(buf) }
 }
 
 /// Returns a slice of `v` between `start` and `end`.
@@ -940,13 +940,13 @@ impl<'a> Reader for &'a mut (Reader+'a) {
 /// `start` > `end`.
 // Private function here because we aren't sure if we want to expose this as
 // API yet. If so, it should be a method on Vec.
-unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: uint, end: uint) -> &'a mut [T] {
+unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: usize, end: usize) -> &'a mut [T] {
     use slice;
 
     assert!(start <= end);
     assert!(end <= v.capacity());
     slice::from_raw_parts_mut(
-        v.as_mut_ptr().offset(start as int),
+        v.as_mut_ptr().offset(start as isize),
         end - start
     )
 }
@@ -980,15 +980,15 @@ pub struct RefReader<'a, R:'a> {
 }
 
 impl<'a, R: Reader> Reader for RefReader<'a, R> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { self.inner.read(buf) }
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> { self.inner.read(buf) }
 }
 
 impl<'a, R: Buffer> Buffer for RefReader<'a, R> {
     fn fill_buf(&mut self) -> IoResult<&[u8]> { self.inner.fill_buf() }
-    fn consume(&mut self, amt: uint) { self.inner.consume(amt) }
+    fn consume(&mut self, amt: usize) { self.inner.consume(amt) }
 }
 
-fn extend_sign(val: u64, nbytes: uint) -> i64 {
+fn extend_sign(val: u64, nbytes: usize) -> i64 {
     let shift = (8 - nbytes) * 8;
     (val << shift) as i64 >> shift
 }
@@ -1095,39 +1095,39 @@ pub trait Writer {
         self.write_all(&buf[..n])
     }
 
-    /// Write the result of passing n through `int::to_str_bytes`.
+    /// Write the result of passing n through `isize::to_str_bytes`.
     #[inline]
-    fn write_int(&mut self, n: int) -> IoResult<()> {
+    fn write_int(&mut self, n: isize) -> IoResult<()> {
         write!(self, "{}", n)
     }
 
-    /// Write the result of passing n through `uint::to_str_bytes`.
+    /// Write the result of passing n through `usize::to_str_bytes`.
     #[inline]
-    fn write_uint(&mut self, n: uint) -> IoResult<()> {
+    fn write_uint(&mut self, n: usize) -> IoResult<()> {
         write!(self, "{}", n)
     }
 
-    /// Write a little-endian uint (number of bytes depends on system).
+    /// Write a little-endian usize (number of bytes depends on system).
     #[inline]
-    fn write_le_uint(&mut self, n: uint) -> IoResult<()> {
+    fn write_le_uint(&mut self, n: usize) -> IoResult<()> {
         extensions::u64_to_le_bytes(n as u64, usize::BYTES as usize, |v| self.write_all(v))
     }
 
-    /// Write a little-endian int (number of bytes depends on system).
+    /// Write a little-endian isize (number of bytes depends on system).
     #[inline]
-    fn write_le_int(&mut self, n: int) -> IoResult<()> {
+    fn write_le_int(&mut self, n: isize) -> IoResult<()> {
         extensions::u64_to_le_bytes(n as u64, isize::BYTES as usize, |v| self.write_all(v))
     }
 
-    /// Write a big-endian uint (number of bytes depends on system).
+    /// Write a big-endian usize (number of bytes depends on system).
     #[inline]
-    fn write_be_uint(&mut self, n: uint) -> IoResult<()> {
+    fn write_be_uint(&mut self, n: usize) -> IoResult<()> {
         extensions::u64_to_be_bytes(n as u64, usize::BYTES as usize, |v| self.write_all(v))
     }
 
-    /// Write a big-endian int (number of bytes depends on system).
+    /// Write a big-endian isize (number of bytes depends on system).
     #[inline]
-    fn write_be_int(&mut self, n: int) -> IoResult<()> {
+    fn write_be_int(&mut self, n: isize) -> IoResult<()> {
         extensions::u64_to_be_bytes(n as u64, isize::BYTES as usize, |v| self.write_all(v))
     }
 
@@ -1409,7 +1409,7 @@ pub trait Buffer: Reader {
 
     /// Tells this buffer that `amt` bytes have been consumed from the buffer,
     /// so they should no longer be returned in calls to `read`.
-    fn consume(&mut self, amt: uint);
+    fn consume(&mut self, amt: usize);
 
     /// Reads the next line of input, interpreted as a sequence of UTF-8
     /// encoded Unicode codepoints. If a newline is encountered, then the
@@ -1588,9 +1588,7 @@ pub trait Seek {
 /// connections.
 ///
 /// Doing so produces some sort of Acceptor.
-pub trait Listener<T, A: Acceptor<T>>
-    : PhantomFn<T,T> // FIXME should be an assoc type anyhow
-{
+pub trait Listener<A: Acceptor> {
     /// Spin up the listener and start queuing incoming connections
     ///
     /// # Error
@@ -1601,13 +1599,16 @@ pub trait Listener<T, A: Acceptor<T>>
 }
 
 /// An acceptor is a value that presents incoming connections
-pub trait Acceptor<T> {
+pub trait Acceptor {
+    /// Type of connection that is accepted by this acceptor.
+    type Connection;
+
     /// Wait for and accept an incoming connection
     ///
     /// # Error
     ///
     /// Returns `Err` if an I/O error is encountered.
-    fn accept(&mut self) -> IoResult<T>;
+    fn accept(&mut self) -> IoResult<Self::Connection>;
 
     /// Create an iterator over incoming connection attempts.
     ///
@@ -1628,11 +1629,10 @@ pub struct IncomingConnections<'a, A: ?Sized +'a> {
     inc: &'a mut A,
 }
 
-#[old_impl_check]
-impl<'a, T, A: ?Sized + Acceptor<T>> Iterator for IncomingConnections<'a, A> {
-    type Item = IoResult<T>;
+impl<'a, A: ?Sized + Acceptor> Iterator for IncomingConnections<'a, A> {
+    type Item = IoResult<A::Connection>;
 
-    fn next(&mut self) -> Option<IoResult<T>> {
+    fn next(&mut self) -> Option<IoResult<A::Connection>> {
         Some(self.inc.accept())
     }
 }
@@ -1870,8 +1870,8 @@ mod tests {
 
     #[derive(Clone, PartialEq, Debug)]
     enum BadReaderBehavior {
-        GoodBehavior(uint),
-        BadBehavior(uint)
+        GoodBehavior(usize),
+        BadBehavior(usize)
     }
 
     struct BadReader<T> {
@@ -1886,7 +1886,7 @@ mod tests {
     }
 
     impl<T: Reader> Reader for BadReader<T> {
-        fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+        fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
             let BadReader { ref mut behavior, ref mut r } = *self;
             loop {
                 if behavior.is_empty() {
diff --git a/src/libstd/old_io/net/addrinfo.rs b/src/libstd/old_io/net/addrinfo.rs
index 2b7506b5c34..739439ebd15 100644
--- a/src/libstd/old_io/net/addrinfo.rs
+++ b/src/libstd/old_io/net/addrinfo.rs
@@ -19,8 +19,8 @@ pub use self::SocketType::*;
 pub use self::Flag::*;
 pub use self::Protocol::*;
 
-use iter::IteratorExt;
-use old_io::{IoResult};
+use iter::Iterator;
+use old_io::IoResult;
 use old_io::net::ip::{SocketAddr, IpAddr};
 use option::Option;
 use option::Option::{Some, None};
@@ -63,19 +63,19 @@ pub enum Protocol {
 /// `man -s 3 getaddrinfo`
 #[derive(Copy, Debug)]
 pub struct Hint {
-    pub family: uint,
+    pub family: usize,
     pub socktype: Option<SocketType>,
     pub protocol: Option<Protocol>,
-    pub flags: uint,
+    pub flags: usize,
 }
 
 #[derive(Copy, Debug)]
 pub struct Info {
     pub address: SocketAddr,
-    pub family: uint,
+    pub family: usize,
     pub socktype: Option<SocketType>,
     pub protocol: Option<Protocol>,
-    pub flags: uint,
+    pub flags: usize,
 }
 
 /// Easy name resolution. Given a hostname, returns the list of IP addresses for
diff --git a/src/libstd/old_io/net/ip.rs b/src/libstd/old_io/net/ip.rs
index f7953ac51b8..26e1bb6550b 100644
--- a/src/libstd/old_io/net/ip.rs
+++ b/src/libstd/old_io/net/ip.rs
@@ -21,7 +21,7 @@ use boxed::Box;
 use fmt;
 use old_io::{self, IoResult, IoError};
 use old_io::net;
-use iter::{Iterator, IteratorExt};
+use iter::Iterator;
 use ops::{FnOnce, FnMut};
 use option::Option;
 use option::Option::{None, Some};
@@ -82,7 +82,7 @@ impl fmt::Display for SocketAddr {
 struct Parser<'a> {
     // parsing as ASCII, so can use byte array
     s: &'a [u8],
-    pos: uint,
+    pos: usize,
 }
 
 impl<'a> Parser<'a> {
@@ -256,7 +256,7 @@ impl<'a> Parser<'a> {
             Ipv6Addr(gs[0], gs[1], gs[2], gs[3], gs[4], gs[5], gs[6], gs[7])
         }
 
-        fn read_groups(p: &mut Parser, groups: &mut [u16; 8], limit: uint) -> (uint, bool) {
+        fn read_groups(p: &mut Parser, groups: &mut [u16; 8], limit: usize) -> (usize, bool) {
             let mut i = 0;
             while i < limit {
                 if i < limit - 1 {
diff --git a/src/libstd/old_io/net/pipe.rs b/src/libstd/old_io/net/pipe.rs
index f9e5ae71e12..3a071e832af 100644
--- a/src/libstd/old_io/net/pipe.rs
+++ b/src/libstd/old_io/net/pipe.rs
@@ -150,7 +150,7 @@ impl Clone for UnixStream {
 }
 
 impl Reader for UnixStream {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.read(buf)
     }
 }
@@ -202,7 +202,7 @@ impl UnixListener {
     }
 }
 
-impl Listener<UnixStream, UnixAcceptor> for UnixListener {
+impl Listener<UnixAcceptor> for UnixListener {
     fn listen(self) -> IoResult<UnixAcceptor> {
         self.inner.listen()
             .map(|inner| UnixAcceptor { inner: inner })
@@ -250,7 +250,8 @@ impl UnixAcceptor {
     }
 }
 
-impl Acceptor<UnixStream> for UnixAcceptor {
+impl Acceptor for UnixAcceptor {
+    type Connection = UnixStream;
     fn accept(&mut self) -> IoResult<UnixStream> {
         self.inner.accept().map(|s| {
             UnixStream { inner: s }
diff --git a/src/libstd/old_io/net/tcp.rs b/src/libstd/old_io/net/tcp.rs
index 75f786f0bb1..7fc460c16ef 100644
--- a/src/libstd/old_io/net/tcp.rs
+++ b/src/libstd/old_io/net/tcp.rs
@@ -122,7 +122,7 @@ impl TcpStream {
     /// this connection. Otherwise, the keepalive timeout will be set to the
     /// specified time, in seconds.
     #[unstable(feature = "io")]
-    pub fn set_keepalive(&mut self, delay_in_seconds: Option<uint>) -> IoResult<()> {
+    pub fn set_keepalive(&mut self, delay_in_seconds: Option<usize>) -> IoResult<()> {
         self.inner.set_keepalive(delay_in_seconds)
     }
 
@@ -257,7 +257,7 @@ impl Clone for TcpStream {
 }
 
 impl Reader for TcpStream {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.read(buf)
     }
 }
@@ -338,7 +338,7 @@ impl TcpListener {
     }
 }
 
-impl Listener<TcpStream, TcpAcceptor> for TcpListener {
+impl Listener<TcpAcceptor> for TcpListener {
     fn listen(self) -> IoResult<TcpAcceptor> {
         self.inner.listen(128).map(|a| TcpAcceptor { inner: a })
     }
@@ -453,7 +453,8 @@ impl TcpAcceptor {
     }
 }
 
-impl Acceptor<TcpStream> for TcpAcceptor {
+impl Acceptor for TcpAcceptor {
+    type Connection = TcpStream;
     fn accept(&mut self) -> IoResult<TcpStream> {
         self.inner.accept().map(TcpStream::new)
     }
@@ -789,12 +790,12 @@ mod test {
     #[test]
     fn multiple_connect_interleaved_greedy_schedule_ip4() {
         let addr = next_test_ip4();
-        static MAX: int = 10;
+        static MAX: isize = 10;
         let acceptor = TcpListener::bind(addr).listen();
 
         let _t = thread::spawn(move|| {
             let mut acceptor = acceptor;
-            for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
+            for (i, stream) in acceptor.incoming().enumerate().take(MAX as usize) {
                 // Start another task to handle the connection
                 let _t = thread::spawn(move|| {
                     let mut stream = stream;
@@ -808,7 +809,7 @@ mod test {
 
         connect(0, addr);
 
-        fn connect(i: int, addr: SocketAddr) {
+        fn connect(i: isize, addr: SocketAddr) {
             if i == MAX { return }
 
             let _t = thread::spawn(move|| {
@@ -825,12 +826,12 @@ mod test {
     #[test]
     fn multiple_connect_interleaved_greedy_schedule_ip6() {
         let addr = next_test_ip6();
-        static MAX: int = 10;
+        static MAX: isize = 10;
         let acceptor = TcpListener::bind(addr).listen();
 
         let _t = thread::spawn(move|| {
             let mut acceptor = acceptor;
-            for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
+            for (i, stream) in acceptor.incoming().enumerate().take(MAX as usize) {
                 // Start another task to handle the connection
                 let _t = thread::spawn(move|| {
                     let mut stream = stream;
@@ -844,7 +845,7 @@ mod test {
 
         connect(0, addr);
 
-        fn connect(i: int, addr: SocketAddr) {
+        fn connect(i: isize, addr: SocketAddr) {
             if i == MAX { return }
 
             let _t = thread::spawn(move|| {
@@ -860,13 +861,13 @@ mod test {
 
     #[test]
     fn multiple_connect_interleaved_lazy_schedule_ip4() {
-        static MAX: int = 10;
+        static MAX: isize = 10;
         let addr = next_test_ip4();
         let acceptor = TcpListener::bind(addr).listen();
 
         let _t = thread::spawn(move|| {
             let mut acceptor = acceptor;
-            for stream in acceptor.incoming().take(MAX as uint) {
+            for stream in acceptor.incoming().take(MAX as usize) {
                 // Start another task to handle the connection
                 let _t = thread::spawn(move|| {
                     let mut stream = stream;
@@ -880,7 +881,7 @@ mod test {
 
         connect(0, addr);
 
-        fn connect(i: int, addr: SocketAddr) {
+        fn connect(i: isize, addr: SocketAddr) {
             if i == MAX { return }
 
             let _t = thread::spawn(move|| {
@@ -896,13 +897,13 @@ mod test {
 
     #[test]
     fn multiple_connect_interleaved_lazy_schedule_ip6() {
-        static MAX: int = 10;
+        static MAX: isize = 10;
         let addr = next_test_ip6();
         let acceptor = TcpListener::bind(addr).listen();
 
         let _t = thread::spawn(move|| {
             let mut acceptor = acceptor;
-            for stream in acceptor.incoming().take(MAX as uint) {
+            for stream in acceptor.incoming().take(MAX as usize) {
                 // Start another task to handle the connection
                 let _t = thread::spawn(move|| {
                     let mut stream = stream;
@@ -916,7 +917,7 @@ mod test {
 
         connect(0, addr);
 
-        fn connect(i: int, addr: SocketAddr) {
+        fn connect(i: isize, addr: SocketAddr) {
             if i == MAX { return }
 
             let _t = thread::spawn(move|| {
diff --git a/src/libstd/old_io/net/udp.rs b/src/libstd/old_io/net/udp.rs
index 3aa811974b3..196447d71ef 100644
--- a/src/libstd/old_io/net/udp.rs
+++ b/src/libstd/old_io/net/udp.rs
@@ -73,7 +73,7 @@ impl UdpSocket {
 
     /// Receives data from the socket. On success, returns the number of bytes
     /// read and the address from whence the data came.
-    pub fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)> {
+    pub fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(usize, SocketAddr)> {
         self.inner.recv_from(buf)
     }
 
@@ -113,13 +113,13 @@ impl UdpSocket {
 
     /// Sets the multicast TTL
     #[unstable(feature = "io")]
-    pub fn set_multicast_ttl(&mut self, ttl: int) -> IoResult<()> {
+    pub fn set_multicast_ttl(&mut self, ttl: isize) -> IoResult<()> {
         self.inner.multicast_time_to_live(ttl)
     }
 
     /// Sets this socket's TTL
     #[unstable(feature = "io")]
-    pub fn set_ttl(&mut self, ttl: int) -> IoResult<()> {
+    pub fn set_ttl(&mut self, ttl: isize) -> IoResult<()> {
         self.inner.time_to_live(ttl)
     }
 
diff --git a/src/libstd/old_io/pipe.rs b/src/libstd/old_io/pipe.rs
index 0b555e2f0ff..26f24600479 100644
--- a/src/libstd/old_io/pipe.rs
+++ b/src/libstd/old_io/pipe.rs
@@ -100,7 +100,7 @@ impl Clone for PipeStream {
 }
 
 impl Reader for PipeStream {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.read(buf)
     }
 }
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
index d7ede451fb8..06940bf6860 100644
--- a/src/libstd/old_io/process.rs
+++ b/src/libstd/old_io/process.rs
@@ -41,16 +41,16 @@ use thread;
 
 /// Signal a process to exit, without forcibly killing it. Corresponds to
 /// SIGTERM on unix platforms.
-#[cfg(windows)] pub const PleaseExitSignal: int = 15;
+#[cfg(windows)] pub const PleaseExitSignal: isize = 15;
 /// Signal a process to exit immediately, forcibly killing it. Corresponds to
 /// SIGKILL on unix platforms.
-#[cfg(windows)] pub const MustDieSignal: int = 9;
+#[cfg(windows)] pub const MustDieSignal: isize = 9;
 /// Signal a process to exit, without forcibly killing it. Corresponds to
 /// SIGTERM on unix platforms.
-#[cfg(not(windows))] pub const PleaseExitSignal: int = libc::SIGTERM as int;
+#[cfg(not(windows))] pub const PleaseExitSignal: isize = libc::SIGTERM as isize;
 /// Signal a process to exit immediately, forcibly killing it. Corresponds to
 /// SIGKILL on unix platforms.
-#[cfg(not(windows))] pub const MustDieSignal: int = libc::SIGKILL as int;
+#[cfg(not(windows))] pub const MustDieSignal: isize = libc::SIGKILL as isize;
 
 /// Representation of a running or exited child process.
 ///
@@ -60,7 +60,7 @@ use thread;
 ///
 /// # Examples
 ///
-/// ```should_fail
+/// ```should_panic
 /// # #![feature(old_io)]
 /// use std::old_io::*;
 ///
@@ -80,7 +80,7 @@ pub struct Process {
     exit_code: Option<ProcessExit>,
 
     /// Manually delivered signal
-    exit_signal: Option<int>,
+    exit_signal: Option<isize>,
 
     /// Deadline after which wait() will return
     deadline: u64,
@@ -186,8 +186,8 @@ pub struct Command {
     stdin: StdioContainer,
     stdout: StdioContainer,
     stderr: StdioContainer,
-    uid: Option<uint>,
-    gid: Option<uint>,
+    uid: Option<usize>,
+    gid: Option<usize>,
     detach: bool,
 }
 
@@ -321,14 +321,14 @@ impl Command {
     /// the child process. Setting this value on windows will cause the spawn to
     /// fail. Failure in the `setuid` call on unix will also cause the spawn to
     /// fail.
-    pub fn uid<'a>(&'a mut self, id: uint) -> &'a mut Command {
+    pub fn uid<'a>(&'a mut self, id: usize) -> &'a mut Command {
         self.uid = Some(id);
         self
     }
 
     /// Similar to `uid`, but sets the group id of the child process. This has
     /// the same semantics as the `uid` field.
-    pub fn gid<'a>(&'a mut self, id: uint) -> &'a mut Command {
+    pub fn gid<'a>(&'a mut self, id: usize) -> &'a mut Command {
         self.gid = Some(id);
         self
     }
@@ -458,10 +458,10 @@ impl sys::process::ProcessConfig<EnvKey, CString> for Command {
     fn cwd(&self) -> Option<&CString> {
         self.cwd.as_ref()
     }
-    fn uid(&self) -> Option<uint> {
+    fn uid(&self) -> Option<usize> {
         self.uid.clone()
     }
-    fn gid(&self) -> Option<uint> {
+    fn gid(&self) -> Option<usize> {
         self.gid.clone()
     }
     fn detach(&self) -> bool {
@@ -507,10 +507,10 @@ pub enum StdioContainer {
 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
 pub enum ProcessExit {
     /// Normal termination with an exit status.
-    ExitStatus(int),
+    ExitStatus(isize),
 
     /// Termination by signal, with the signal number.
-    ExitSignal(int),
+    ExitSignal(isize),
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -533,7 +533,7 @@ impl ProcessExit {
 
     /// Checks whether this ProcessExit matches the given exit status.
     /// Termination by signal will never match an exit code.
-    pub fn matches_exit_status(&self, wanted: int) -> bool {
+    pub fn matches_exit_status(&self, wanted: isize) -> bool {
         *self == ExitStatus(wanted)
     }
 }
@@ -549,7 +549,7 @@ impl Process {
     /// process. Note, though, that on some platforms signals will continue to
     /// be successfully delivered if the child has exited, but not yet been
     /// reaped.
-    pub fn kill(id: libc::pid_t, signal: int) -> IoResult<()> {
+    pub fn kill(id: libc::pid_t, signal: isize) -> IoResult<()> {
         unsafe { ProcessImp::killpid(id, signal) }
     }
 
@@ -571,7 +571,7 @@ impl Process {
     /// # Errors
     ///
     /// If the signal delivery fails, the corresponding error is returned.
-    pub fn signal(&mut self, signal: int) -> IoResult<()> {
+    pub fn signal(&mut self, signal: isize) -> IoResult<()> {
         #[cfg(unix)] fn collect_status(p: &mut Process) {
             // On Linux (and possibly other unices), a process that has exited will
             // continue to accept signals because it is "defunct". The delivery of
@@ -888,8 +888,8 @@ mod tests {
         use libc;
         let mut p = Command::new("/bin/sh")
                             .arg("-c").arg("true")
-                            .uid(unsafe { libc::getuid() as uint })
-                            .gid(unsafe { libc::getgid() as uint })
+                            .uid(unsafe { libc::getuid() as usize })
+                            .gid(unsafe { libc::getgid() as usize })
                             .spawn().unwrap();
         assert!(p.wait().unwrap().success());
     }
diff --git a/src/libstd/old_io/result.rs b/src/libstd/old_io/result.rs
index 9dcb487cdb0..e1037f26b7f 100644
--- a/src/libstd/old_io/result.rs
+++ b/src/libstd/old_io/result.rs
@@ -35,7 +35,7 @@ impl<W: Writer> Writer for IoResult<W> {
 }
 
 impl<R: Reader> Reader for IoResult<R> {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         match *self {
             Ok(ref mut reader) => reader.read(buf),
             Err(ref e) => Err(e.clone()),
@@ -58,7 +58,7 @@ impl<S: Seek> Seek for IoResult<S> {
     }
 }
 
-impl<T, A: Acceptor<T>, L: Listener<T, A>> Listener<T, A> for IoResult<L> {
+impl<A: Acceptor, L: Listener<A>> Listener<A> for IoResult<L> {
     fn listen(self) -> IoResult<A> {
         match self {
             Ok(listener) => listener.listen(),
@@ -67,8 +67,9 @@ impl<T, A: Acceptor<T>, L: Listener<T, A>> Listener<T, A> for IoResult<L> {
     }
 }
 
-impl<T, A: Acceptor<T>> Acceptor<T> for IoResult<A> {
-    fn accept(&mut self) -> IoResult<T> {
+impl<A: Acceptor> Acceptor for IoResult<A> {
+    type Connection = A::Connection;
+    fn accept(&mut self) -> IoResult<A::Connection> {
         match *self {
             Ok(ref mut acceptor) => acceptor.accept(),
             Err(ref e) => Err(e.clone()),
diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs
index 90d27084911..b4924c7b78b 100644
--- a/src/libstd/old_io/stdio.rs
+++ b/src/libstd/old_io/stdio.rs
@@ -182,7 +182,7 @@ impl StdinReader {
 }
 
 impl Reader for StdinReader {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.lock().unwrap().0.read(buf)
     }
 
@@ -190,11 +190,11 @@ impl Reader for StdinReader {
     // read more than once and we don't want those calls to interleave (or
     // incur the costs of repeated locking).
 
-    fn read_at_least(&mut self, min: uint, buf: &mut [u8]) -> IoResult<uint> {
+    fn read_at_least(&mut self, min: usize, buf: &mut [u8]) -> IoResult<usize> {
         self.inner.lock().unwrap().0.read_at_least(min, buf)
     }
 
-    fn push_at_least(&mut self, min: uint, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> {
+    fn push_at_least(&mut self, min: usize, len: usize, buf: &mut Vec<u8>) -> IoResult<usize> {
         self.inner.lock().unwrap().0.push_at_least(min, len, buf)
     }
 
@@ -202,11 +202,11 @@ impl Reader for StdinReader {
         self.inner.lock().unwrap().0.read_to_end()
     }
 
-    fn read_le_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
+    fn read_le_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
         self.inner.lock().unwrap().0.read_le_uint_n(nbytes)
     }
 
-    fn read_be_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
+    fn read_be_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
         self.inner.lock().unwrap().0.read_be_uint_n(nbytes)
     }
 }
@@ -410,16 +410,16 @@ impl StdReader {
 }
 
 impl Reader for StdReader {
-    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         let ret = match self.inner {
             TTY(ref mut tty) => {
                 // Flush the task-local stdout so that weird issues like a
                 // print!'d prompt not being shown until after the user hits
                 // enter.
                 flush();
-                tty.read(buf).map(|i| i as uint)
+                tty.read(buf).map(|i| i as usize)
             },
-            File(ref mut file) => file.read(buf).map(|i| i as uint),
+            File(ref mut file) => file.read(buf).map(|i| i as usize),
         };
         match ret {
             // When reading a piped stdin, libuv will return 0-length reads when
@@ -452,7 +452,7 @@ impl StdWriter {
     ///
     /// This function will return an error if the output stream is not actually
     /// connected to a TTY instance, or if querying the TTY instance fails.
-    pub fn winsize(&mut self) -> IoResult<(int, int)> {
+    pub fn winsize(&mut self) -> IoResult<(isize, isize)> {
         match self.inner {
             TTY(ref mut tty) => {
                 tty.get_winsize()
diff --git a/src/libstd/old_io/tempfile.rs b/src/libstd/old_io/tempfile.rs
index c0f6ddaaef7..0a2cc517a06 100644
--- a/src/libstd/old_io/tempfile.rs
+++ b/src/libstd/old_io/tempfile.rs
@@ -12,7 +12,7 @@
 #![allow(deprecated)] // rand
 
 use env;
-use iter::{IteratorExt};
+use iter::Iterator;
 use old_io::{fs, IoError, IoErrorKind, IoResult};
 use old_io;
 use ops::Drop;
@@ -89,7 +89,7 @@ const NUM_RETRIES: u32 = 1 << 31;
 // be enough to dissuade an attacker from trying to preemptively create names
 // of that length, but not so huge that we unnecessarily drain the random number
 // generator of entropy.
-const NUM_RAND_CHARS: uint = 12;
+const NUM_RAND_CHARS: usize = 12;
 
 impl TempDir {
     /// Attempts to make a temporary directory inside of `tmpdir` whose name
diff --git a/src/libstd/old_io/util.rs b/src/libstd/old_io/util.rs
index 1f782b6f221..604099f1178 100644
--- a/src/libstd/old_io/util.rs
+++ b/src/libstd/old_io/util.rs
@@ -22,7 +22,7 @@ use slice::bytes::MutableByteVector;
 #[deprecated(since = "1.0.0", reason = "use std::io::Take")]
 #[unstable(feature = "old_io")]
 pub struct LimitReader<R> {
-    limit: uint,
+    limit: usize,
     inner: R
 }
 
@@ -32,7 +32,7 @@ impl<R: Reader> LimitReader<R> {
     /// Creates a new `LimitReader`
     #[deprecated(since = "1.0.0", reason = "use std::io's take method instead")]
     #[unstable(feature = "old_io")]
-    pub fn new(r: R, limit: uint) -> LimitReader<R> {
+    pub fn new(r: R, limit: usize) -> LimitReader<R> {
         LimitReader { limit: limit, inner: r }
     }
 
@@ -46,13 +46,13 @@ impl<R: Reader> LimitReader<R> {
     ///
     /// The reader may reach EOF after reading fewer bytes than indicated by
     /// this method if the underlying reader reaches EOF.
-    pub fn limit(&self) -> uint { self.limit }
+    pub fn limit(&self) -> usize { self.limit }
 }
 
 #[deprecated(since = "1.0.0", reason = "use std::io's take method instead")]
 #[unstable(feature = "old_io")]
 impl<R: Reader> Reader for LimitReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
         if self.limit == 0 {
             return Err(old_io::standard_error(old_io::EndOfFile));
         }
@@ -80,7 +80,7 @@ impl<R: Buffer> Buffer for LimitReader<R> {
         }
     }
 
-    fn consume(&mut self, amt: uint) {
+    fn consume(&mut self, amt: usize) {
         // Don't let callers reset the limit by passing an overlarge value
         let amt = cmp::min(amt, self.limit);
         self.limit -= amt;
@@ -112,7 +112,7 @@ pub struct ZeroReader;
 #[unstable(feature = "old_io")]
 impl Reader for ZeroReader {
     #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
         buf.set_memory(0);
         Ok(buf.len())
     }
@@ -126,7 +126,7 @@ impl Buffer for ZeroReader {
         Ok(&DATA)
     }
 
-    fn consume(&mut self, _amt: uint) {}
+    fn consume(&mut self, _amt: usize) {}
 }
 
 /// A `Reader` which is always at EOF, like /dev/null.
@@ -139,7 +139,7 @@ pub struct NullReader;
 #[unstable(feature = "old_io")]
 impl Reader for NullReader {
     #[inline]
-    fn read(&mut self, _buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, _buf: &mut [u8]) -> old_io::IoResult<usize> {
         Err(old_io::standard_error(old_io::EndOfFile))
     }
 }
@@ -150,7 +150,7 @@ impl Buffer for NullReader {
     fn fill_buf<'a>(&'a mut self) -> old_io::IoResult<&'a [u8]> {
         Err(old_io::standard_error(old_io::EndOfFile))
     }
-    fn consume(&mut self, _amt: uint) {}
+    fn consume(&mut self, _amt: usize) {}
 }
 
 /// A `Writer` which multiplexes writes to a set of `Writer`s.
@@ -216,7 +216,7 @@ impl<R: Reader, I: Iterator<Item=R>> ChainedReader<I, R> {
 #[deprecated(since = "1.0.0", reason = "use std::io::Chain instead")]
 #[unstable(feature = "old_io")]
 impl<R: Reader, I: Iterator<Item=R>> Reader for ChainedReader<I, R> {
-    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
         loop {
             let err = match self.cur_reader {
                 Some(ref mut r) => {
@@ -269,7 +269,7 @@ impl<R: Reader, W: Writer> TeeReader<R, W> {
 #[deprecated(since = "1.0.0", reason = "use std::io::Tee instead")]
 #[unstable(feature = "old_io")]
 impl<R: Reader, W: Writer> Reader for TeeReader<R, W> {
-    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
         self.reader.read(buf).and_then(|len| {
             self.writer.write_all(&mut buf[..len]).map(|()| len)
         })
@@ -307,7 +307,7 @@ impl<T: Iterator<Item=u8>> IterReader<T> {
 
 impl<T: Iterator<Item=u8>> Reader for IterReader<T> {
     #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<uint> {
+    fn read(&mut self, buf: &mut [u8]) -> old_io::IoResult<usize> {
         let mut len = 0;
         for (slot, elt) in buf.iter_mut().zip(self.iter.by_ref()) {
             *slot = elt;
@@ -392,8 +392,8 @@ mod test {
 
     #[test]
     fn test_multi_writer() {
-        static mut writes: uint = 0;
-        static mut flushes: uint = 0;
+        static mut writes: usize = 0;
+        static mut flushes: usize = 0;
 
         struct TestWriter;
         impl Writer for TestWriter {
diff --git a/src/libstd/old_path/mod.rs b/src/libstd/old_path/mod.rs
index 50bda04b5d0..c405df2824e 100644
--- a/src/libstd/old_path/mod.rs
+++ b/src/libstd/old_path/mod.rs
@@ -70,7 +70,7 @@ use core::marker::Sized;
 use ffi::CString;
 use clone::Clone;
 use fmt;
-use iter::IteratorExt;
+use iter::Iterator;
 use option::Option;
 use option::Option::{None, Some};
 use str;
diff --git a/src/libstd/old_path/posix.rs b/src/libstd/old_path/posix.rs
index 0ab8612a7cb..bbc1756bee6 100644
--- a/src/libstd/old_path/posix.rs
+++ b/src/libstd/old_path/posix.rs
@@ -16,7 +16,7 @@ use fmt;
 use hash;
 use old_io::Writer;
 use iter::{AdditiveIterator, Extend};
-use iter::{Iterator, IteratorExt, Map};
+use iter::{Iterator, Map};
 use marker::Sized;
 use option::Option::{self, Some, None};
 use result::Result::{self, Ok, Err};
@@ -37,7 +37,7 @@ pub type StrComponents<'a> =
 #[derive(Clone)]
 pub struct Path {
     repr: Vec<u8>, // assumed to never be empty or contain NULs
-    sepidx: Option<uint> // index of the final separator in repr
+    sepidx: Option<usize> // index of the final separator in repr
 }
 
 /// The standard path separator character
@@ -444,13 +444,13 @@ mod tests {
     use super::*;
 
     use clone::Clone;
-    use iter::IteratorExt;
     use option::Option::{self, Some, None};
     use old_path::GenericPath;
     use slice::AsSlice;
     use str::{self, Str};
     use string::ToString;
     use vec::Vec;
+    use iter::Iterator;
 
     macro_rules! t {
         (s: $path:expr, $exp:expr) => (
diff --git a/src/libstd/old_path/windows.rs b/src/libstd/old_path/windows.rs
index 4f367e30526..bd67855bf1b 100644
--- a/src/libstd/old_path/windows.rs
+++ b/src/libstd/old_path/windows.rs
@@ -21,7 +21,7 @@ use fmt;
 use hash;
 use old_io::Writer;
 use iter::{AdditiveIterator, Extend};
-use iter::{Iterator, IteratorExt, Map, repeat};
+use iter::{Iterator, Map, repeat};
 use mem;
 use option::Option::{self, Some, None};
 use result::Result::{self, Ok, Err};
@@ -81,7 +81,7 @@ pub type Components<'a> =
 pub struct Path {
     repr: String, // assumed to never be empty
     prefix: Option<PathPrefix>,
-    sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
+    sepidx: Option<usize> // index of the final separator in the non-prefix portion of repr
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -749,7 +749,7 @@ impl Path {
                     if prefix.is_some() && comps.is_empty() {
                         match prefix.unwrap() {
                             DiskPrefix => {
-                                let len = prefix_len(prefix) + is_abs as uint;
+                                let len = prefix_len(prefix) + is_abs as usize;
                                 let mut s = String::from_str(&s[..len]);
                                 unsafe {
                                     let v = s.as_mut_vec();
@@ -764,7 +764,7 @@ impl Path {
                                 Some(s)
                             }
                             VerbatimDiskPrefix => {
-                                let len = prefix_len(prefix) + is_abs as uint;
+                                let len = prefix_len(prefix) + is_abs as usize;
                                 let mut s = String::from_str(&s[..len]);
                                 unsafe {
                                     let v = s.as_mut_vec();
@@ -838,7 +838,7 @@ impl Path {
         self.sepidx = idx.and_then(|x| if x < prefixlen { None } else { Some(x) });
     }
 
-    fn prefix_len(&self) -> uint {
+    fn prefix_len(&self) -> usize {
         prefix_len(self.prefix)
     }
 
@@ -847,7 +847,7 @@ impl Path {
     // end is the length of the string, normally, or the index of the final character if it is
     // a non-semantic trailing separator in a verbatim string.
     // If the prefix is considered the separator, before and after are the same.
-    fn sepidx_or_prefix_len(&self) -> Option<(uint,uint,uint)> {
+    fn sepidx_or_prefix_len(&self) -> Option<(usize,usize,usize)> {
         match self.sepidx {
             None => match self.prefix_len() { 0 => None, x => Some((x,x,self.repr.len())) },
             Some(x) => {
@@ -973,16 +973,16 @@ pub fn is_sep_byte_verbatim(u: &u8) -> bool {
 /// Prefix types for Path
 #[derive(Copy, PartialEq, Clone, Debug)]
 pub enum PathPrefix {
-    /// Prefix `\\?\`, uint is the length of the following component
-    VerbatimPrefix(uint),
+    /// Prefix `\\?\`, usize is the length of the following component
+    VerbatimPrefix(usize),
     /// Prefix `\\?\UNC\`, uints are the lengths of the UNC components
-    VerbatimUNCPrefix(uint, uint),
+    VerbatimUNCPrefix(usize, usize),
     /// Prefix `\\?\C:\` (for any alphabetic character)
     VerbatimDiskPrefix,
-    /// Prefix `\\.\`, uint is the length of the following component
-    DeviceNSPrefix(uint),
+    /// Prefix `\\.\`, usize is the length of the following component
+    DeviceNSPrefix(usize),
     /// UNC prefix `\\server\share`, uints are the lengths of the server/share
-    UNCPrefix(uint, uint),
+    UNCPrefix(usize, usize),
     /// Prefix `C:` for any alphabetic character
     DiskPrefix
 }
@@ -1037,7 +1037,7 @@ fn parse_prefix<'a>(mut path: &'a str) -> Option<PathPrefix> {
     }
     return None;
 
-    fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(uint, uint)> {
+    fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(usize, usize)> {
         let idx_a = match path.find(f) {
             None => return None,
             Some(x) => x
@@ -1107,7 +1107,7 @@ fn prefix_is_verbatim(p: Option<PathPrefix>) -> bool {
     }
 }
 
-fn prefix_len(p: Option<PathPrefix>) -> uint {
+fn prefix_len(p: Option<PathPrefix>) -> usize {
     match p {
         None => 0,
         Some(VerbatimPrefix(x)) => 4 + x,
@@ -1126,7 +1126,7 @@ mod tests {
     use super::*;
 
     use clone::Clone;
-    use iter::IteratorExt;
+    use iter::Iterator;
     use option::Option::{self, Some, None};
     use old_path::GenericPath;
     use slice::AsSlice;
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 40aaea7aca0..e19c734b8a3 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -43,7 +43,7 @@ use env;
 use error::{FromError, Error};
 use ffi::{OsString, OsStr};
 use fmt;
-use iter::{Iterator, IteratorExt};
+use iter::Iterator;
 use libc::{c_void, c_int, c_char};
 use libc;
 use marker::{Copy, Send};
@@ -100,9 +100,9 @@ fn path2old(path: &path::Path) -> Path {
 }
 
 /// Get the number of cores available
-pub fn num_cpus() -> uint {
+pub fn num_cpus() -> usize {
     unsafe {
-        return rust_get_num_cpus() as uint;
+        return rust_get_num_cpus() as usize;
     }
 
     extern {
@@ -110,7 +110,7 @@ pub fn num_cpus() -> uint {
     }
 }
 
-pub const TMPBUF_SZ : uint = 1000;
+pub const TMPBUF_SZ : usize = 1000;
 
 /// Returns the current working directory as a `Path`.
 ///
@@ -592,7 +592,7 @@ pub fn last_os_error() -> String {
 /// Note that this is not synchronized against modifications of other threads.
 #[deprecated(since = "1.0.0", reason = "renamed to env::set_exit_status")]
 #[unstable(feature = "os")]
-pub fn set_exit_status(code: int) {
+pub fn set_exit_status(code: isize) {
     env::set_exit_status(code as i32)
 }
 
@@ -600,12 +600,12 @@ pub fn set_exit_status(code: int) {
 /// by calling `set_exit_status`.
 #[deprecated(since = "1.0.0", reason = "renamed to env::get_exit_status")]
 #[unstable(feature = "os")]
-pub fn get_exit_status() -> int {
+pub fn get_exit_status() -> isize {
     env::get_exit_status() as isize
 }
 
 #[cfg(target_os = "macos")]
-unsafe fn load_argc_and_argv(argc: int,
+unsafe fn load_argc_and_argv(argc: isize,
                              argv: *const *const c_char) -> Vec<Vec<u8>> {
     use ffi::CStr;
 
@@ -620,7 +620,7 @@ unsafe fn load_argc_and_argv(argc: int,
 #[cfg(target_os = "macos")]
 fn real_args_as_bytes() -> Vec<Vec<u8>> {
     unsafe {
-        let (argc, argv) = (*_NSGetArgc() as int,
+        let (argc, argv) = (*_NSGetArgc() as isize,
                             *_NSGetArgv() as *const *const c_char);
         load_argc_and_argv(argc, argv)
     }
@@ -670,7 +670,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
         let info = objc_msgSend(klass, processInfoSel);
         let args = objc_msgSend(info, argumentsSel);
 
-        let cnt: int = mem::transmute(objc_msgSend(args, countSel));
+        let cnt: isize = mem::transmute(objc_msgSend(args, countSel));
         for i in 0..cnt {
             let tmp = objc_msgSend(args, objectAtSel, i);
             let utf_c_str: *const libc::c_char =
@@ -711,11 +711,11 @@ fn real_args() -> Vec<String> {
     let lpCmdLine = unsafe { GetCommandLineW() };
     let szArgList = unsafe { CommandLineToArgvW(lpCmdLine, lpArgCount) };
 
-    let args: Vec<_> = (0..nArgs as uint).map(|i| unsafe {
+    let args: Vec<_> = (0..nArgs as usize).map(|i| unsafe {
         // Determine the length of this argument.
-        let ptr = *szArgList.offset(i as int);
+        let ptr = *szArgList.offset(i as isize);
         let mut len = 0;
-        while *ptr.offset(len as int) != 0 { len += 1; }
+        while *ptr.offset(len as isize) != 0 { len += 1; }
 
         // Push it onto the list.
         let ptr = ptr as *const u16;
@@ -796,7 +796,7 @@ extern {
 /// Returns the page size of the current architecture in bytes.
 #[deprecated(since = "1.0.0", reason = "renamed to env::page_size")]
 #[unstable(feature = "os")]
-pub fn page_size() -> uint {
+pub fn page_size() -> usize {
     sys::os::page_size()
 }
 
@@ -810,7 +810,7 @@ pub fn page_size() -> uint {
 /// let it leave scope by accident if you want it to stick around.
 pub struct MemoryMap {
     data: *mut u8,
-    len: uint,
+    len: usize,
     kind: MemoryMapKind,
 }
 
@@ -846,9 +846,9 @@ pub enum MapOption {
     /// Create a memory mapping for a file with a given fd.
     #[cfg(not(windows))]
     MapFd(c_int),
-    /// When using `MapFd`, the start of the map is `uint` bytes from the start
+    /// When using `MapFd`, the start of the map is `usize` bytes from the start
     /// of the file.
-    MapOffset(uint),
+    MapOffset(usize),
     /// On POSIX, this can be used to specify the default flags passed to
     /// `mmap`. By default it uses `MAP_PRIVATE` and, if not using `MapFd`,
     /// `MAP_ANON`. This will override both of those. This is platform-specific
@@ -880,7 +880,7 @@ pub enum MapError {
     /// Not all platforms obey this, but this wrapper does.
     ErrZeroLength,
     /// Unrecognized error. The inner value is the unrecognized errno.
-    ErrUnknown(int),
+    ErrUnknown(isize),
     /// # The following are Windows-specific
     ///
     /// Unsupported combination of protection flags
@@ -940,7 +940,7 @@ impl Error for MapError {
 }
 
 // Round up `from` to be divisible by `to`
-fn round_up(from: uint, to: uint) -> uint {
+fn round_up(from: usize, to: usize) -> usize {
     let r = if from % to == 0 {
         from
     } else {
@@ -958,7 +958,7 @@ impl MemoryMap {
     /// Create a new mapping with the given `options`, at least `min_len` bytes
     /// long. `min_len` must be greater than zero; see the note on
     /// `ErrZeroLength`.
-    pub fn new(min_len: uint, options: &[MapOption]) -> Result<MemoryMap, MapError> {
+    pub fn new(min_len: usize, options: &[MapOption]) -> Result<MemoryMap, MapError> {
         use libc::off_t;
 
         if min_len == 0 {
@@ -1002,7 +1002,7 @@ impl MemoryMap {
                 libc::EINVAL => ErrUnaligned,
                 libc::ENODEV => ErrNoMapSupport,
                 libc::ENOMEM => ErrNoMem,
-                code => ErrUnknown(code as int)
+                code => ErrUnknown(code as isize)
             })
         } else {
             Ok(MemoryMap {
@@ -1019,7 +1019,7 @@ impl MemoryMap {
 
     /// Granularity that the offset or address must be for `MapOffset` and
     /// `MapAddr` respectively.
-    pub fn granularity() -> uint {
+    pub fn granularity() -> usize {
         env::page_size()
     }
 }
@@ -1040,7 +1040,7 @@ impl Drop for MemoryMap {
 #[cfg(windows)]
 impl MemoryMap {
     /// Create a new mapping with the given `options`, at least `min_len` bytes long.
-    pub fn new(min_len: uint, options: &[MapOption]) -> Result<MemoryMap, MapError> {
+    pub fn new(min_len: usize, options: &[MapOption]) -> Result<MemoryMap, MapError> {
         use libc::types::os::arch::extra::{LPVOID, DWORD, SIZE_T, HANDLE};
 
         let mut lpAddress: LPVOID = ptr::null_mut();
@@ -1048,7 +1048,7 @@ impl MemoryMap {
         let mut writable = false;
         let mut executable = false;
         let mut handle: HANDLE = libc::INVALID_HANDLE_VALUE;
-        let mut offset: uint = 0;
+        let mut offset: usize = 0;
         let len = round_up(min_len, env::page_size());
 
         for &o in options {
@@ -1083,7 +1083,7 @@ impl MemoryMap {
                                    libc::MEM_COMMIT | libc::MEM_RESERVE,
                                    flProtect)
             };
-            match r as uint {
+            match r as usize {
                 0 => Err(ErrVirtualAlloc(errno())),
                 _ => Ok(MemoryMap {
                    data: r as *mut u8,
@@ -1119,7 +1119,7 @@ impl MemoryMap {
                                             ((len as u64) >> 32) as DWORD,
                                             (offset & 0xffff_ffff) as DWORD,
                                             0);
-                match r as uint {
+                match r as usize {
                     0 => Err(ErrMapViewOfFile(errno())),
                     _ => Ok(MemoryMap {
                        data: r as *mut u8,
@@ -1133,13 +1133,13 @@ impl MemoryMap {
 
     /// Granularity of MapAddr() and MapOffset() parameter values.
     /// This may be greater than the value returned by page_size().
-    pub fn granularity() -> uint {
+    pub fn granularity() -> usize {
         use mem;
         unsafe {
             let mut info = mem::zeroed();
             libc::GetSystemInfo(&mut info);
 
-            return info.dwAllocationGranularity as uint;
+            return info.dwAllocationGranularity as usize;
         }
     }
 }
@@ -1178,7 +1178,7 @@ impl MemoryMap {
     /// Returns the pointer to the memory created or modified by this map.
     pub fn data(&self) -> *mut u8 { self.data }
     /// Returns the number of bytes this map applies to.
-    pub fn len(&self) -> uint { self.len }
+    pub fn len(&self) -> usize { self.len }
     /// Returns the type of mapping this represents.
     pub fn kind(&self) -> MemoryMapKind { self.kind }
 }
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 50f79967f55..58d3ae9f7cf 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1038,23 +1038,16 @@ impl PathBuf {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a Path> for PathBuf {
-    fn from(s: &'a Path) -> PathBuf {
-        s.to_path_buf()
+impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for PathBuf {
+    fn from(s: &'a T) -> PathBuf {
+        PathBuf::from(s.as_ref().to_os_string())
     }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a str> for PathBuf {
-    fn from(s: &'a str) -> PathBuf {
-        PathBuf::from(OsString::from(s))
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a String> for PathBuf {
-    fn from(s: &'a String) -> PathBuf {
-        PathBuf::from(OsString::from(s))
+impl From<OsString> for PathBuf {
+    fn from(s: OsString) -> PathBuf {
+        PathBuf { inner: s }
     }
 }
 
@@ -1066,27 +1059,6 @@ impl From<String> for PathBuf {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a OsStr> for PathBuf {
-    fn from(s: &'a OsStr) -> PathBuf {
-        PathBuf::from(OsString::from(s))
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> From<&'a OsString> for PathBuf {
-    fn from(s: &'a OsString) -> PathBuf {
-        PathBuf::from(s.to_os_string())
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-impl From<OsString> for PathBuf {
-    fn from(s: OsString) -> PathBuf {
-        PathBuf { inner: s }
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
 impl<P: AsRef<Path>> iter::FromIterator<P> for PathBuf {
     fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> PathBuf {
         let mut buf = PathBuf::new();
diff --git a/src/libstd/prelude/v1.rs b/src/libstd/prelude/v1.rs
index 6e12ac1a226..611dd85a71b 100644
--- a/src/libstd/prelude/v1.rs
+++ b/src/libstd/prelude/v1.rs
@@ -36,7 +36,7 @@
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(no_inline)] pub use iter::ExactSizeIterator;
 #[stable(feature = "rust1", since = "1.0.0")]
-#[doc(no_inline)] pub use iter::{Iterator, IteratorExt, Extend};
+#[doc(no_inline)] pub use iter::{Iterator, Extend};
 #[stable(feature = "rust1", since = "1.0.0")]
 #[doc(no_inline)] pub use option::Option::{self, Some, None};
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 6a36ecefcf4..b4bd513e8f0 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -37,7 +37,7 @@ use thread;
 ///
 /// # Examples
 ///
-/// ```should_fail
+/// ```should_panic
 /// # #![feature(process)]
 ///
 /// use std::process::Command;
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index 656ca980624..fad57323d34 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -64,7 +64,7 @@
 //!
 //! let mut rng = rand::thread_rng();
 //! if rng.gen() { // random bool
-//!     println!("int: {}, uint: {}", rng.gen::<int>(), rng.gen::<uint>())
+//!     println!("isize: {}, usize: {}", rng.gen::<isize>(), rng.gen::<usize>())
 //! }
 //! ```
 //!
@@ -148,7 +148,7 @@
 //! }
 //!
 //! // Run a single simulation of the Monty Hall problem.
-//! fn simulate<R: Rng>(random_door: &Range<uint>, rng: &mut R) -> SimulationResult {
+//! fn simulate<R: Rng>(random_door: &Range<usize>, rng: &mut R) -> SimulationResult {
 //!     let car = random_door.ind_sample(rng);
 //!
 //!     // This is our initial choice
@@ -168,18 +168,18 @@
 //!
 //! // Returns the door the game host opens given our choice and knowledge of
 //! // where the car is. The game host will never open the door with the car.
-//! fn game_host_open<R: Rng>(car: uint, choice: uint, rng: &mut R) -> uint {
+//! fn game_host_open<R: Rng>(car: usize, choice: usize, rng: &mut R) -> usize {
 //!     let choices = free_doors(&[car, choice]);
 //!     rand::sample(rng, choices.into_iter(), 1)[0]
 //! }
 //!
 //! // Returns the door we switch to, given our current choice and
 //! // the open door. There will only be one valid door.
-//! fn switch_door(choice: uint, open: uint) -> uint {
+//! fn switch_door(choice: usize, open: usize) -> usize {
 //!     free_doors(&[choice, open])[0]
 //! }
 //!
-//! fn free_doors(blocked: &[uint]) -> Vec<uint> {
+//! fn free_doors(blocked: &[usize]) -> Vec<usize> {
 //!     (0..3).filter(|x| !blocked.contains(x)).collect()
 //! }
 //!
@@ -231,7 +231,7 @@
 use cell::RefCell;
 use clone::Clone;
 use old_io::IoResult;
-use iter::{Iterator, IteratorExt};
+use iter::Iterator;
 use mem;
 use rc::Rc;
 use result::Result::{Ok, Err};
@@ -336,7 +336,7 @@ pub struct ThreadRng {
 
 /// Retrieve the lazily-initialized thread-local random number
 /// generator, seeded by the system. Intended to be used in method
-/// chaining style, e.g. `thread_rng().gen::<int>()`.
+/// chaining style, e.g. `thread_rng().gen::<isize>()`.
 ///
 /// The RNG provided will reseed itself from the operating system
 /// after generating a certain amount of randomness.
@@ -556,14 +556,14 @@ mod test {
         let mut r = thread_rng();
         assert_eq!(r.choose(&[1, 1, 1]).cloned(), Some(1));
 
-        let v: &[int] = &[];
+        let v: &[isize] = &[];
         assert_eq!(r.choose(v), None);
     }
 
     #[test]
     fn test_shuffle() {
         let mut r = thread_rng();
-        let empty: &mut [int] = &mut [];
+        let empty: &mut [isize] = &mut [];
         r.shuffle(empty);
         let mut one = [1];
         r.shuffle(&mut one);
@@ -583,7 +583,7 @@ mod test {
     #[test]
     fn test_thread_rng() {
         let mut r = thread_rng();
-        r.gen::<int>();
+        r.gen::<isize>();
         let mut v = [1, 1, 1];
         r.shuffle(&mut v);
         let b: &[_] = &[1, 1, 1];
@@ -594,12 +594,12 @@ mod test {
     #[test]
     fn test_random() {
         // not sure how to test this aside from just getting some values
-        let _n : uint = random();
+        let _n : usize = random();
         let _f : f32 = random();
         let _o : Option<Option<i8>> = random();
         let _many : ((),
-                     (uint,
-                      int,
+                     (usize,
+                      isize,
                       Option<(u32, (bool,))>),
                      (u8, i8, u16, i16, u32, i32, u64, i64),
                      (f32, (f64, (f64,)))) = random();
@@ -611,7 +611,7 @@ mod test {
         let max_val = 100;
 
         let mut r = thread_rng();
-        let vals = (min_val..max_val).collect::<Vec<int>>();
+        let vals = (min_val..max_val).collect::<Vec<isize>>();
         let small_sample = sample(&mut r, vals.iter(), 5);
         let large_sample = sample(&mut r, vals.iter(), vals.len() + 5);
 
@@ -625,7 +625,7 @@ mod test {
 
     #[test]
     fn test_std_rng_seeded() {
-        let s = thread_rng().gen_iter::<uint>().take(256).collect::<Vec<uint>>();
+        let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>();
         let mut ra: StdRng = SeedableRng::from_seed(&*s);
         let mut rb: StdRng = SeedableRng::from_seed(&*s);
         assert!(order::equals(ra.gen_ascii_chars().take(100),
@@ -634,7 +634,7 @@ mod test {
 
     #[test]
     fn test_std_rng_reseed() {
-        let s = thread_rng().gen_iter::<uint>().take(256).collect::<Vec<uint>>();
+        let s = thread_rng().gen_iter::<usize>().take(256).collect::<Vec<usize>>();
         let mut r: StdRng = SeedableRng::from_seed(&*s);
         let string1 = r.gen_ascii_chars().take(100).collect::<String>();
 
@@ -662,10 +662,10 @@ mod bench {
         let mut rng: XorShiftRng = OsRng::new().unwrap().gen();
         b.iter(|| {
             for _ in 0..RAND_BENCH_N {
-                rng.gen::<uint>();
+                rng.gen::<usize>();
             }
         });
-        b.bytes = size_of::<uint>() as u64 * RAND_BENCH_N;
+        b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
     }
 
     #[bench]
@@ -673,10 +673,10 @@ mod bench {
         let mut rng: IsaacRng = OsRng::new().unwrap().gen();
         b.iter(|| {
             for _ in 0..RAND_BENCH_N {
-                rng.gen::<uint>();
+                rng.gen::<usize>();
             }
         });
-        b.bytes = size_of::<uint>() as u64 * RAND_BENCH_N;
+        b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
     }
 
     #[bench]
@@ -684,10 +684,10 @@ mod bench {
         let mut rng: Isaac64Rng = OsRng::new().unwrap().gen();
         b.iter(|| {
             for _ in 0..RAND_BENCH_N {
-                rng.gen::<uint>();
+                rng.gen::<usize>();
             }
         });
-        b.bytes = size_of::<uint>() as u64 * RAND_BENCH_N;
+        b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
     }
 
     #[bench]
@@ -695,16 +695,16 @@ mod bench {
         let mut rng = StdRng::new().unwrap();
         b.iter(|| {
             for _ in 0..RAND_BENCH_N {
-                rng.gen::<uint>();
+                rng.gen::<usize>();
             }
         });
-        b.bytes = size_of::<uint>() as u64 * RAND_BENCH_N;
+        b.bytes = size_of::<usize>() as u64 * RAND_BENCH_N;
     }
 
     #[bench]
     fn rand_shuffle_100(b: &mut Bencher) {
         let mut rng = weak_rng();
-        let x : &mut[uint] = &mut [1; 100];
+        let x : &mut[usize] = &mut [1; 100];
         b.iter(|| {
             rng.shuffle(x);
         })
diff --git a/src/libstd/rand/reader.rs b/src/libstd/rand/reader.rs
index d3a8fa864fc..ece6867ddca 100644
--- a/src/libstd/rand/reader.rs
+++ b/src/libstd/rand/reader.rs
@@ -29,7 +29,7 @@ use result::Result::{Ok, Err};
 /// use std::old_io::MemReader;
 ///
 /// let mut rng = reader::ReaderRng::new(MemReader::new(vec!(1,2,3,4,5,6,7,8)));
-/// println!("{:x}", rng.gen::<uint>());
+/// println!("{:x}", rng.gen::<usize>());
 /// ```
 pub struct ReaderRng<R> {
     reader: R
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs
index 9da63405346..428bcaa49f7 100644
--- a/src/libstd/rt/args.rs
+++ b/src/libstd/rt/args.rs
@@ -23,7 +23,7 @@ use core::prelude::*;
 use vec::Vec;
 
 /// One-time global initialization.
-pub unsafe fn init(argc: int, argv: *const *const u8) { imp::init(argc, argv) }
+pub unsafe fn init(argc: isize, argv: *const *const u8) { imp::init(argc, argv) }
 
 /// One-time global cleanup.
 pub unsafe fn cleanup() { imp::cleanup() }
@@ -54,10 +54,10 @@ mod imp {
 
     use sync::{StaticMutex, MUTEX_INIT};
 
-    static mut GLOBAL_ARGS_PTR: uint = 0;
+    static mut GLOBAL_ARGS_PTR: usize = 0;
     static LOCK: StaticMutex = MUTEX_INIT;
 
-    pub unsafe fn init(argc: int, argv: *const *const u8) {
+    pub unsafe fn init(argc: isize, argv: *const *const u8) {
         let args = load_argc_and_argv(argc, argv);
         put(args);
     }
@@ -146,7 +146,7 @@ mod imp {
     use core::prelude::*;
     use vec::Vec;
 
-    pub unsafe fn init(_argc: int, _argv: *const *const u8) {
+    pub unsafe fn init(_argc: isize, _argv: *const *const u8) {
     }
 
     pub fn cleanup() {
diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs
index 3063d9d942a..b7769910564 100644
--- a/src/libstd/rt/libunwind.rs
+++ b/src/libstd/rt/libunwind.rs
@@ -64,25 +64,25 @@ pub type _Unwind_Exception_Class = u64;
 pub type _Unwind_Word = libc::uintptr_t;
 
 #[cfg(target_arch = "x86")]
-pub const unwinder_private_data_size: uint = 5;
+pub const unwinder_private_data_size: usize = 5;
 
 #[cfg(target_arch = "x86_64")]
-pub const unwinder_private_data_size: uint = 6;
+pub const unwinder_private_data_size: usize = 6;
 
 #[cfg(all(target_arch = "arm", not(target_os = "ios")))]
-pub const unwinder_private_data_size: uint = 20;
+pub const unwinder_private_data_size: usize = 20;
 
 #[cfg(all(target_arch = "arm", target_os = "ios"))]
-pub const unwinder_private_data_size: uint = 5;
+pub const unwinder_private_data_size: usize = 5;
 
 #[cfg(target_arch = "aarch64")]
-pub const unwinder_private_data_size: uint = 2;
+pub const unwinder_private_data_size: usize = 2;
 
 #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
-pub const unwinder_private_data_size: uint = 2;
+pub const unwinder_private_data_size: usize = 2;
 
 #[cfg(target_arch = "powerpc")]
-pub const unwinder_private_data_size: uint = 2;
+pub const unwinder_private_data_size: usize = 2;
 
 #[repr(C)]
 pub struct _Unwind_Exception {
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index 497076cc6ac..696c7960c3e 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -48,16 +48,16 @@ mod libunwind;
 
 /// The default error code of the rust runtime if the main thread panics instead
 /// of exiting cleanly.
-pub const DEFAULT_ERROR_CODE: int = 101;
+pub const DEFAULT_ERROR_CODE: isize = 101;
 
 #[cfg(any(windows, android))]
-const OS_DEFAULT_STACK_ESTIMATE: uint = 1 << 20;
+const OS_DEFAULT_STACK_ESTIMATE: usize = 1 << 20;
 #[cfg(all(unix, not(android)))]
-const OS_DEFAULT_STACK_ESTIMATE: uint = 2 * (1 << 20);
+const OS_DEFAULT_STACK_ESTIMATE: usize = 2 * (1 << 20);
 
 #[cfg(not(test))]
 #[lang = "start"]
-fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int {
+fn lang_start(main: *const u8, argc: isize, argv: *const *const u8) -> isize {
     use prelude::v1::*;
 
     use mem;
@@ -68,13 +68,13 @@ fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int {
     use thread::Thread;
 
     let something_around_the_top_of_the_stack = 1;
-    let addr = &something_around_the_top_of_the_stack as *const _ as *const int;
-    let my_stack_top = addr as uint;
+    let addr = &something_around_the_top_of_the_stack as *const _ as *const isize;
+    let my_stack_top = addr as usize;
 
     // FIXME #11359 we just assume that this thread has a stack of a
     // certain size, and estimate that there's at most 20KB of stack
     // frames above our current position.
-    const TWENTY_KB: uint = 20000;
+    const TWENTY_KB: usize = 20000;
 
     // saturating-add to sidestep overflow
     let top_plus_spill = if usize::MAX - TWENTY_KB < my_stack_top {
diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs
index 3ee3954ed64..e4927bbd3d2 100644
--- a/src/libstd/rt/unwind.rs
+++ b/src/libstd/rt/unwind.rs
@@ -78,12 +78,12 @@ struct Exception {
     cause: Option<Box<Any + Send + 'static>>,
 }
 
-pub type Callback = fn(msg: &(Any + Send), file: &'static str, line: uint);
+pub type Callback = fn(msg: &(Any + Send), file: &'static str, line: usize);
 
 // Variables used for invoking callbacks when a thread starts to unwind.
 //
 // For more information, see below.
-const MAX_CALLBACKS: uint = 16;
+const MAX_CALLBACKS: usize = 16;
 static CALLBACKS: [atomic::AtomicUsize; MAX_CALLBACKS] =
         [atomic::ATOMIC_USIZE_INIT, atomic::ATOMIC_USIZE_INIT,
          atomic::ATOMIC_USIZE_INIT, atomic::ATOMIC_USIZE_INIT,
@@ -176,7 +176,7 @@ fn rust_panic(cause: Box<Any + Send + 'static>) -> ! {
         };
         let exception_param = boxed::into_raw(exception) as *mut uw::_Unwind_Exception;
         let error = uw::_Unwind_RaiseException(exception_param);
-        rtabort!("Could not unwind stack, error = {}", error as int)
+        rtabort!("Could not unwind stack, error = {}", error as isize)
     }
 
     extern fn exception_cleanup(_unwind_code: uw::_Unwind_Reason_Code,
@@ -484,7 +484,7 @@ pub mod eabi {
 /// Entry point of panic from the libcore crate.
 #[lang = "panic_fmt"]
 pub extern fn rust_begin_unwind(msg: fmt::Arguments,
-                                file: &'static str, line: uint) -> ! {
+                                file: &'static str, line: usize) -> ! {
     begin_unwind_fmt(msg, &(file, line))
 }
 
@@ -496,7 +496,7 @@ pub extern fn rust_begin_unwind(msg: fmt::Arguments,
 /// the actual formatting into this shared place.
 #[inline(never)] #[cold]
 #[stable(since = "1.0.0", feature = "rust1")]
-pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
+pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, usize)) -> ! {
     use fmt::Write;
 
     // We do two allocations here, unfortunately. But (a) they're
@@ -512,7 +512,7 @@ pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, uint)) -
 /// This is the entry point of unwinding for panic!() and assert!().
 #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
 #[stable(since = "1.0.0", feature = "rust1")]
-pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, uint)) -> ! {
+pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, usize)) -> ! {
     // Note that this should be the only allocation performed in this code path.
     // Currently this means that panic!() on OOM will invoke this code path,
     // but then again we're not really ready for panic on OOM anyway. If
@@ -535,7 +535,7 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, uint)) ->
 /// }` from ~1900/3700 (-O/no opts) to 180/590.
 #[inline(never)] #[cold] // this is the slow path, please never inline this
 fn begin_unwind_inner(msg: Box<Any + Send>,
-                      file_line: &(&'static str, uint)) -> ! {
+                      file_line: &(&'static str, usize)) -> ! {
     // Make sure the default failure handler is registered before we look at the
     // callbacks. We also use a raw sys-based mutex here instead of a
     // `std::sync` one as accessing TLS can cause weird recursive problems (and
diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs
index cf627ca2548..5a482fbb50f 100644
--- a/src/libstd/rt/util.rs
+++ b/src/libstd/rt/util.rs
@@ -43,7 +43,7 @@ pub fn limit_thread_creation_due_to_osx_and_valgrind() -> bool {
     (cfg!(target_os="macos")) && running_on_valgrind()
 }
 
-pub fn min_stack() -> uint {
+pub fn min_stack() -> usize {
     static MIN: atomic::AtomicUsize = atomic::ATOMIC_USIZE_INIT;
     match MIN.load(Ordering::SeqCst) {
         0 => {}
diff --git a/src/libstd/sync/future.rs b/src/libstd/sync/future.rs
index 3c7fecb7515..b2afe28fed4 100644
--- a/src/libstd/sync/future.rs
+++ b/src/libstd/sync/future.rs
@@ -38,7 +38,7 @@ use core::mem::replace;
 
 use self::FutureState::*;
 use sync::mpsc::{Receiver, channel};
-use thunk::{Thunk};
+use thunk::Thunk;
 use thread;
 
 /// A type encapsulating the result of a computation which may not be complete
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index eb421fe55a4..b2b87bb6c44 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -1109,13 +1109,13 @@ mod test {
 
     #[test]
     fn drop_full() {
-        let (tx, _rx) = channel::<Box<int>>();
+        let (tx, _rx) = channel::<Box<isize>>();
         tx.send(box 1).unwrap();
     }
 
     #[test]
     fn drop_full_shared() {
-        let (tx, _rx) = channel::<Box<int>>();
+        let (tx, _rx) = channel::<Box<isize>>();
         drop(tx.clone());
         drop(tx.clone());
         tx.send(box 1).unwrap();
@@ -1454,7 +1454,7 @@ mod test {
     #[test]
     fn oneshot_multi_thread_send_recv_stress() {
         for _ in 0..stress_factor() {
-            let (tx, rx) = channel::<Box<int>>();
+            let (tx, rx) = channel::<Box<isize>>();
             let _t = thread::spawn(move|| {
                 tx.send(box 10).unwrap();
             });
@@ -1631,7 +1631,7 @@ mod sync_tests {
 
     #[test]
     fn drop_full() {
-        let (tx, _rx) = sync_channel::<Box<int>>(1);
+        let (tx, _rx) = sync_channel::<Box<isize>>(1);
         tx.send(box 1).unwrap();
     }
 
diff --git a/src/libstd/sync/mpsc/shared.rs b/src/libstd/sync/mpsc/shared.rs
index f3930a8a5d6..80cbd076163 100644
--- a/src/libstd/sync/mpsc/shared.rs
+++ b/src/libstd/sync/mpsc/shared.rs
@@ -398,7 +398,7 @@ impl<T: Send> Packet<T> {
     }
 
     // increment the count on the channel (used for selection)
-    fn bump(&mut self, amt: int) -> int {
+    fn bump(&mut self, amt: isize) -> isize {
         match self.cnt.fetch_add(amt, Ordering::SeqCst) {
             DISCONNECTED => {
                 self.cnt.store(DISCONNECTED, Ordering::SeqCst);
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 6e94db6d753..a79ffaa0860 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -551,7 +551,7 @@ mod tests {
         let arc2 = arc.clone();
         let _ = thread::spawn(move|| -> () {
             struct Unwinder {
-                i: Arc<RwLock<int>>,
+                i: Arc<RwLock<isize>>,
             }
             impl Drop for Unwinder {
                 fn drop(&mut self) {
diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs
index 059cce57245..be521095aa9 100644
--- a/src/libstd/sync/semaphore.rs
+++ b/src/libstd/sync/semaphore.rs
@@ -44,7 +44,7 @@ use sync::{Mutex, Condvar};
 /// sem.release();
 /// ```
 pub struct Semaphore {
-    lock: Mutex<int>,
+    lock: Mutex<isize>,
     cvar: Condvar,
 }
 
@@ -60,7 +60,7 @@ impl Semaphore {
     /// The count specified can be thought of as a number of resources, and a
     /// call to `acquire` or `access` will block until at least one resource is
     /// available. It is valid to initialize a semaphore with a negative count.
-    pub fn new(count: int) -> Semaphore {
+    pub fn new(count: isize) -> Semaphore {
         Semaphore {
             lock: Mutex::new(count),
             cvar: Condvar::new(),
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs
index c42a755b444..cd118b3c9ee 100644
--- a/src/libstd/sys/common/backtrace.rs
+++ b/src/libstd/sys/common/backtrace.rs
@@ -14,10 +14,10 @@ use io::prelude::*;
 use io;
 
 #[cfg(target_pointer_width = "64")]
-pub const HEX_WIDTH: uint = 18;
+pub const HEX_WIDTH: usize = 18;
 
 #[cfg(target_pointer_width = "32")]
-pub const HEX_WIDTH: uint = 10;
+pub const HEX_WIDTH: usize = 10;
 
 // All rust symbols are in theory lists of "::"-separated identifiers. Some
 // assemblers, however, can't handle these characters in symbol names. To get
@@ -57,7 +57,7 @@ pub fn demangle(writer: &mut Write, s: &str) -> io::Result<()> {
             let mut i = 0;
             for c in chars.by_ref() {
                 if c.is_numeric() {
-                    i = i * 10 + c as uint - '0' as uint;
+                    i = i * 10 + c as usize - '0' as usize;
                 } else {
                     break
                 }
@@ -86,7 +86,7 @@ pub fn demangle(writer: &mut Write, s: &str) -> io::Result<()> {
             while rest.char_at(0).is_numeric() {
                 rest = &rest[1..];
             }
-            let i: uint = inner[.. (inner.len() - rest.len())].parse().unwrap();
+            let i: usize = inner[.. (inner.len() - rest.len())].parse().unwrap();
             inner = &rest[i..];
             rest = &rest[..i];
             while rest.len() > 0 {
diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs
index 10077dfd1b8..34a58f6c83a 100644
--- a/src/libstd/sys/common/helper_thread.rs
+++ b/src/libstd/sys/common/helper_thread.rs
@@ -51,7 +51,7 @@ pub struct Helper<M:Send> {
     pub chan: UnsafeCell<*mut Sender<M>>,
 
     /// OS handle used to wake up a blocked helper thread
-    pub signal: UnsafeCell<uint>,
+    pub signal: UnsafeCell<usize>,
 
     /// Flag if this helper thread has booted and been initialized yet.
     pub initialized: UnsafeCell<bool>,
@@ -96,11 +96,11 @@ impl<M: Send> Helper<M> {
     {
         unsafe {
             let _guard = self.lock.lock().unwrap();
-            if *self.chan.get() as uint == 0 {
+            if *self.chan.get() as usize == 0 {
                 let (tx, rx) = channel();
                 *self.chan.get() = boxed::into_raw(box tx);
                 let (receive, send) = helper_signal::new();
-                *self.signal.get() = send as uint;
+                *self.signal.get() = send as usize;
 
                 let receive = RaceBox(receive);
 
@@ -114,7 +114,7 @@ impl<M: Send> Helper<M> {
 
                 let _ = rt::at_exit(move || { self.shutdown() });
                 *self.initialized.get() = true;
-            } else if *self.chan.get() as uint == 1 {
+            } else if *self.chan.get() as usize == 1 {
                 panic!("cannot continue usage after shutdown");
             }
         }
@@ -130,8 +130,8 @@ impl<M: Send> Helper<M> {
             // Must send and *then* signal to ensure that the child receives the
             // message. Otherwise it could wake up and go to sleep before we
             // send the message.
-            assert!(*self.chan.get() as uint != 0);
-            assert!(*self.chan.get() as uint != 1,
+            assert!(*self.chan.get() as usize != 0);
+            assert!(*self.chan.get() as usize != 1,
                     "cannot continue usage after shutdown");
             (**self.chan.get()).send(msg).unwrap();
             helper_signal::signal(*self.signal.get() as helper_signal::signal);
@@ -146,7 +146,7 @@ impl<M: Send> Helper<M> {
             let mut guard = self.lock.lock().unwrap();
 
             let ptr = *self.chan.get();
-            if ptr as uint == 1 {
+            if ptr as usize == 1 {
                 panic!("cannot continue usage after shutdown");
             }
             // Close the channel by destroying it
diff --git a/src/libstd/sys/common/mod.rs b/src/libstd/sys/common/mod.rs
index 29c05b1e0d8..a8769ba99e8 100644
--- a/src/libstd/sys/common/mod.rs
+++ b/src/libstd/sys/common/mod.rs
@@ -56,7 +56,7 @@ pub fn timeout(desc: &'static str) -> IoError {
 }
 
 #[allow(deprecated)]
-pub fn short_write(n: uint, desc: &'static str) -> IoError {
+pub fn short_write(n: usize, desc: &'static str) -> IoError {
     IoError {
         kind: if n == 0 { old_io::TimedOut } else { old_io::ShortWrite(n) },
         desc: desc,
@@ -84,7 +84,7 @@ pub fn mkerr_libc<T: Int>(ret: T) -> IoResult<()> {
 }
 
 pub fn keep_going<F>(data: &[u8], mut f: F) -> i64 where
-    F: FnMut(*const u8, uint) -> i64,
+    F: FnMut(*const u8, usize) -> i64,
 {
     let origamt = data.len();
     let mut data = data.as_ptr();
@@ -94,8 +94,8 @@ pub fn keep_going<F>(data: &[u8], mut f: F) -> i64 where
         if ret == 0 {
             break
         } else if ret != -1 {
-            amt -= ret as uint;
-            data = unsafe { data.offset(ret as int) };
+            amt -= ret as usize;
+            data = unsafe { data.offset(ret as isize) };
         } else {
             return ret;
         }
@@ -134,7 +134,7 @@ pub trait ProcessConfig<K: BytesContainer, V: BytesContainer> {
     fn args(&self) -> &[CString];
     fn env(&self) -> Option<&collections::HashMap<K, V>>;
     fn cwd(&self) -> Option<&CString>;
-    fn uid(&self) -> Option<uint>;
-    fn gid(&self) -> Option<uint>;
+    fn uid(&self) -> Option<usize>;
+    fn gid(&self) -> Option<usize>;
     fn detach(&self) -> bool;
 }
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs
index 96b72b42e54..1a0ee17904a 100644
--- a/src/libstd/sys/common/net.rs
+++ b/src/libstd/sys/common/net.rs
@@ -148,7 +148,7 @@ pub fn getsockopt<T: Copy>(fd: sock_t, opt: libc::c_int,
         if ret != 0 {
             Err(last_net_error())
         } else {
-            assert!(len as uint == mem::size_of::<T>());
+            assert!(len as usize == mem::size_of::<T>());
             Ok(slot)
         }
     }
@@ -170,14 +170,14 @@ pub fn sockname(fd: sock_t,
             return Err(last_net_error())
         }
     }
-    return sockaddr_to_addr(&storage, len as uint);
+    return sockaddr_to_addr(&storage, len as usize);
 }
 
 pub fn sockaddr_to_addr(storage: &libc::sockaddr_storage,
-                        len: uint) -> IoResult<SocketAddr> {
+                        len: usize) -> IoResult<SocketAddr> {
     match storage.ss_family as libc::c_int {
         libc::AF_INET => {
-            assert!(len as uint >= mem::size_of::<libc::sockaddr_in>());
+            assert!(len as usize >= mem::size_of::<libc::sockaddr_in>());
             let storage: &libc::sockaddr_in = unsafe {
                 mem::transmute(storage)
             };
@@ -192,7 +192,7 @@ pub fn sockaddr_to_addr(storage: &libc::sockaddr_storage,
             })
         }
         libc::AF_INET6 => {
-            assert!(len as uint >= mem::size_of::<libc::sockaddr_in6>());
+            assert!(len as usize >= mem::size_of::<libc::sockaddr_in6>());
             let storage: &libc::sockaddr_in6 = unsafe {
                 mem::transmute(storage)
             };
@@ -283,13 +283,13 @@ pub fn get_host_addresses(host: Option<&str>, servname: Option<&str>,
     while !rp.is_null() {
         unsafe {
             let addr = try!(sockaddr_to_addr(mem::transmute((*rp).ai_addr),
-                                             (*rp).ai_addrlen as uint));
+                                             (*rp).ai_addrlen as usize));
             addrs.push(addrinfo::Info {
                 address: addr,
-                family: (*rp).ai_family as uint,
+                family: (*rp).ai_family as usize,
                 socktype: None,
                 protocol: None,
-                flags: (*rp).ai_flags as uint
+                flags: (*rp).ai_flags as usize
             });
 
             rp = (*rp).ai_next as *mut libc::addrinfo;
@@ -312,7 +312,7 @@ extern "system" {
         flags: c_int) -> c_int;
 }
 
-const NI_MAXHOST: uint = 1025;
+const NI_MAXHOST: usize = 1025;
 
 pub fn get_address_name(addr: IpAddr) -> Result<String, IoError> {
     let addr = SocketAddr{ip: addr, port: 0};
@@ -393,7 +393,7 @@ pub fn get_address_name(addr: IpAddr) -> Result<String, IoError> {
 // [1] http://twistedmatrix.com/pipermail/twisted-commits/2012-April/034692.html
 // [2] http://stackoverflow.com/questions/19819198/does-send-msg-dontwait
 
-pub fn read<T, L, R>(fd: sock_t, deadline: u64, mut lock: L, mut read: R) -> IoResult<uint> where
+pub fn read<T, L, R>(fd: sock_t, deadline: u64, mut lock: L, mut read: R) -> IoResult<usize> where
     L: FnMut() -> T,
     R: FnMut(bool) -> libc::c_int,
 {
@@ -431,7 +431,7 @@ pub fn read<T, L, R>(fd: sock_t, deadline: u64, mut lock: L, mut read: R) -> IoR
     match ret {
         0 => Err(sys_common::eof()),
         n if n < 0 => Err(last_net_error()),
-        n => Ok(n as uint)
+        n => Ok(n as usize)
     }
 }
 
@@ -440,9 +440,9 @@ pub fn write<T, L, W>(fd: sock_t,
                       buf: &[u8],
                       write_everything: bool,
                       mut lock: L,
-                      mut write: W) -> IoResult<uint> where
+                      mut write: W) -> IoResult<usize> where
     L: FnMut() -> T,
-    W: FnMut(bool, *const u8, uint) -> i64,
+    W: FnMut(bool, *const u8, usize) -> i64,
 {
     let mut ret = -1;
     let mut written = 0;
@@ -454,7 +454,7 @@ pub fn write<T, L, W>(fd: sock_t,
             });
         } else {
             ret = retry(|| { write(false, buf.as_ptr(), buf.len()) });
-            if ret > 0 { written = ret as uint; }
+            if ret > 0 { written = ret as usize; }
         }
     }
 
@@ -483,7 +483,7 @@ pub fn write<T, L, W>(fd: sock_t,
             match retry(|| write(deadline.is_some(), ptr, len)) {
                 -1 if wouldblock() => {}
                 -1 => return Err(last_net_error()),
-                n => { written += n as uint; }
+                n => { written += n as usize; }
             }
         }
         ret = 0;
@@ -513,8 +513,8 @@ pub fn connect_timeout(fd: sock_t,
         // If the connection is in progress, then we need to wait for it to
         // finish (with a timeout). The current strategy for doing this is
         // to use select() with a timeout.
-        -1 if os::errno() as int == INPROGRESS as int ||
-              os::errno() as int == WOULDBLOCK as int => {
+        -1 if os::errno() as isize == INPROGRESS as isize ||
+              os::errno() as isize == WOULDBLOCK as isize => {
             let mut set: c::fd_set = unsafe { mem::zeroed() };
             c::fd_set(&mut set, fd);
             match await(fd, &mut set, timeout_ms) {
@@ -686,7 +686,7 @@ impl TcpStream {
                    nodelay as libc::c_int)
     }
 
-    pub fn set_keepalive(&mut self, seconds: Option<uint>) -> IoResult<()> {
+    pub fn set_keepalive(&mut self, seconds: Option<usize>) -> IoResult<()> {
         let ret = setsockopt(self.fd(), libc::SOL_SOCKET, libc::SO_KEEPALIVE,
                              seconds.is_some() as libc::c_int);
         match seconds {
@@ -696,18 +696,18 @@ impl TcpStream {
     }
 
     #[cfg(any(target_os = "macos", target_os = "ios"))]
-    fn set_tcp_keepalive(&mut self, seconds: uint) -> IoResult<()> {
+    fn set_tcp_keepalive(&mut self, seconds: usize) -> IoResult<()> {
         setsockopt(self.fd(), libc::IPPROTO_TCP, libc::TCP_KEEPALIVE,
                    seconds as libc::c_int)
     }
     #[cfg(any(target_os = "freebsd",
               target_os = "dragonfly"))]
-    fn set_tcp_keepalive(&mut self, seconds: uint) -> IoResult<()> {
+    fn set_tcp_keepalive(&mut self, seconds: usize) -> IoResult<()> {
         setsockopt(self.fd(), libc::IPPROTO_TCP, libc::TCP_KEEPIDLE,
                    seconds as libc::c_int)
     }
     #[cfg(target_os = "openbsd")]
-    fn set_tcp_keepalive(&mut self, seconds: uint) -> IoResult<()> {
+    fn set_tcp_keepalive(&mut self, seconds: usize) -> IoResult<()> {
         setsockopt(self.fd(), libc::IPPROTO_TCP, libc::SO_KEEPALIVE,
                    seconds as libc::c_int)
     }
@@ -716,7 +716,7 @@ impl TcpStream {
                   target_os = "freebsd",
                   target_os = "dragonfly",
                   target_os = "openbsd")))]
-    fn set_tcp_keepalive(&mut self, _seconds: uint) -> IoResult<()> {
+    fn set_tcp_keepalive(&mut self, _seconds: usize) -> IoResult<()> {
         Ok(())
     }
 
@@ -733,7 +733,7 @@ impl TcpStream {
         ret
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         let fd = self.fd();
         let dolock = || self.lock_nonblocking();
         let doread = |nb| unsafe {
@@ -749,7 +749,7 @@ impl TcpStream {
     pub fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         let fd = self.fd();
         let dolock = || self.lock_nonblocking();
-        let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe {
+        let dowrite = |nb: bool, buf: *const u8, len: usize| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::send(fd,
                        buf as *const _,
@@ -876,7 +876,7 @@ impl UdpSocket {
         sockname(self.fd(), libc::getsockname)
     }
 
-    pub fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)> {
+    pub fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(usize, SocketAddr)> {
         let fd = self.fd();
         let mut storage: libc::sockaddr_storage = unsafe { mem::zeroed() };
         let storagep = &mut storage as *mut _ as *mut libc::sockaddr;
@@ -893,7 +893,7 @@ impl UdpSocket {
                            storagep,
                            &mut addrlen) as libc::c_int
         }));
-        Ok((n as uint, sockaddr_to_addr(&storage, addrlen as uint).unwrap()))
+        Ok((n as usize, sockaddr_to_addr(&storage, addrlen as usize).unwrap()))
     }
 
     pub fn send_to(&mut self, buf: &[u8], dst: SocketAddr) -> IoResult<()> {
@@ -903,7 +903,7 @@ impl UdpSocket {
 
         let fd = self.fd();
         let dolock = || self.lock_nonblocking();
-        let dowrite = |nb, buf: *const u8, len: uint| unsafe {
+        let dowrite = |nb, buf: *const u8, len: usize| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::sendto(fd,
                          buf as *const libc::c_void,
@@ -939,11 +939,11 @@ impl UdpSocket {
         }
     }
 
-    pub fn multicast_time_to_live(&mut self, ttl: int) -> IoResult<()> {
+    pub fn multicast_time_to_live(&mut self, ttl: isize) -> IoResult<()> {
         setsockopt(self.fd(), libc::IPPROTO_IP, libc::IP_MULTICAST_TTL,
                    ttl as libc::c_int)
     }
-    pub fn time_to_live(&mut self, ttl: int) -> IoResult<()> {
+    pub fn time_to_live(&mut self, ttl: isize) -> IoResult<()> {
         setsockopt(self.fd(), libc::IPPROTO_IP, libc::IP_TTL, ttl as libc::c_int)
     }
 
diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs
index 8c428275ccf..8dc3407db77 100644
--- a/src/libstd/sys/common/stack.rs
+++ b/src/libstd/sys/common/stack.rs
@@ -46,7 +46,7 @@
 // corresponding prolog, decision was taken to disable segmented
 // stack support on iOS.
 
-pub const RED_ZONE: uint = 20 * 1024;
+pub const RED_ZONE: usize = 20 * 1024;
 
 /// This function is invoked from rust's current __morestack function. Segmented
 /// stacks are currently not enabled as segmented stacks, but rather one giant
@@ -117,7 +117,7 @@ extern fn stack_exhausted() {
 // On all other platforms both variants behave identically.
 
 #[inline(always)]
-pub unsafe fn record_os_managed_stack_bounds(stack_lo: uint, _stack_hi: uint) {
+pub unsafe fn record_os_managed_stack_bounds(stack_lo: usize, _stack_hi: usize) {
     record_sp_limit(stack_lo + RED_ZONE);
 }
 
@@ -136,31 +136,31 @@ pub unsafe fn record_os_managed_stack_bounds(stack_lo: uint, _stack_hi: uint) {
 /// would be unfortunate for the functions themselves to trigger a morestack
 /// invocation (if they were an actual function call).
 #[inline(always)]
-pub unsafe fn record_sp_limit(limit: uint) {
+pub unsafe fn record_sp_limit(limit: usize) {
     return target_record_sp_limit(limit);
 
     // x86-64
     #[cfg(all(target_arch = "x86_64",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movq $$0x60+90*8, %rsi
               movq $0, %gs:(%rsi)" :: "r"(limit) : "rsi" : "volatile")
     }
     #[cfg(all(target_arch = "x86_64", target_os = "linux"))] #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movq $0, %fs:112" :: "r"(limit) :: "volatile")
     }
     #[cfg(all(target_arch = "x86_64", target_os = "windows"))] #[inline(always)]
-    unsafe fn target_record_sp_limit(_: uint) {
+    unsafe fn target_record_sp_limit(_: usize) {
     }
     #[cfg(all(target_arch = "x86_64", target_os = "freebsd"))] #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movq $0, %fs:24" :: "r"(limit) :: "volatile")
     }
     #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))]
     #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile")
     }
 
@@ -168,18 +168,18 @@ pub unsafe fn record_sp_limit(limit: uint) {
     #[cfg(all(target_arch = "x86",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movl $$0x48+90*4, %eax
               movl $0, %gs:(%eax)" :: "r"(limit) : "eax" : "volatile")
     }
     #[cfg(all(target_arch = "x86",
               any(target_os = "linux", target_os = "freebsd")))]
     #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         asm!("movl $0, %gs:48" :: "r"(limit) :: "volatile")
     }
     #[cfg(all(target_arch = "x86", target_os = "windows"))] #[inline(always)]
-    unsafe fn target_record_sp_limit(_: uint) {
+    unsafe fn target_record_sp_limit(_: usize) {
     }
 
     // mips, arm - Some brave soul can port these to inline asm, but it's over
@@ -188,7 +188,7 @@ pub unsafe fn record_sp_limit(limit: uint) {
               target_arch = "mipsel",
               all(target_arch = "arm", not(target_os = "ios"))))]
     #[inline(always)]
-    unsafe fn target_record_sp_limit(limit: uint) {
+    unsafe fn target_record_sp_limit(limit: usize) {
         use libc::c_void;
         return record_sp_limit(limit as *const c_void);
         extern {
@@ -205,7 +205,7 @@ pub unsafe fn record_sp_limit(limit: uint) {
               all(target_arch = "arm", target_os = "ios"),
               target_os = "bitrig",
               target_os = "openbsd"))]
-    unsafe fn target_record_sp_limit(_: uint) {
+    unsafe fn target_record_sp_limit(_: usize) {
     }
 }
 
@@ -218,38 +218,38 @@ pub unsafe fn record_sp_limit(limit: uint) {
 /// As with the setter, this function does not have a __morestack header and can
 /// therefore be called in a "we're out of stack" situation.
 #[inline(always)]
-pub unsafe fn get_sp_limit() -> uint {
+pub unsafe fn get_sp_limit() -> usize {
     return target_get_sp_limit();
 
     // x86-64
     #[cfg(all(target_arch = "x86_64",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movq $$0x60+90*8, %rsi
               movq %gs:(%rsi), $0" : "=r"(limit) :: "rsi" : "volatile");
         return limit;
     }
     #[cfg(all(target_arch = "x86_64", target_os = "linux"))] #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movq %fs:112, $0" : "=r"(limit) ::: "volatile");
         return limit;
     }
     #[cfg(all(target_arch = "x86_64", target_os = "windows"))] #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         return 1024;
     }
     #[cfg(all(target_arch = "x86_64", target_os = "freebsd"))] #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movq %fs:24, $0" : "=r"(limit) ::: "volatile");
         return limit;
     }
     #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movq %fs:32, $0" : "=r"(limit) ::: "volatile");
         return limit;
@@ -259,7 +259,7 @@ pub unsafe fn get_sp_limit() -> uint {
     #[cfg(all(target_arch = "x86",
               any(target_os = "macos", target_os = "ios")))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movl $$0x48+90*4, %eax
               movl %gs:(%eax), $0" : "=r"(limit) :: "eax" : "volatile");
@@ -268,13 +268,13 @@ pub unsafe fn get_sp_limit() -> uint {
     #[cfg(all(target_arch = "x86",
               any(target_os = "linux", target_os = "freebsd")))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         let limit;
         asm!("movl %gs:48, $0" : "=r"(limit) ::: "volatile");
         return limit;
     }
     #[cfg(all(target_arch = "x86", target_os = "windows"))] #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         return 1024;
     }
 
@@ -284,9 +284,9 @@ pub unsafe fn get_sp_limit() -> uint {
               target_arch = "mipsel",
               all(target_arch = "arm", not(target_os = "ios"))))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         use libc::c_void;
-        return get_sp_limit() as uint;
+        return get_sp_limit() as usize;
         extern {
             fn get_sp_limit() -> *const c_void;
         }
@@ -305,7 +305,7 @@ pub unsafe fn get_sp_limit() -> uint {
               target_os = "bitrig",
               target_os = "openbsd"))]
     #[inline(always)]
-    unsafe fn target_get_sp_limit() -> uint {
+    unsafe fn target_get_sp_limit() -> usize {
         1024
     }
 }
diff --git a/src/libstd/sys/common/thread_info.rs b/src/libstd/sys/common/thread_info.rs
index 90526b8f4f3..22cb5943371 100644
--- a/src/libstd/sys/common/thread_info.rs
+++ b/src/libstd/sys/common/thread_info.rs
@@ -18,7 +18,7 @@ use thread::Thread;
 use thread::LocalKeyState;
 
 struct ThreadInfo {
-    stack_guard: uint,
+    stack_guard: usize,
     thread: Thread,
 }
 
@@ -47,11 +47,11 @@ pub fn current_thread() -> Thread {
     ThreadInfo::with(|info| info.thread.clone())
 }
 
-pub fn stack_guard() -> uint {
+pub fn stack_guard() -> usize {
     ThreadInfo::with(|info| info.stack_guard)
 }
 
-pub fn set(stack_guard: uint, thread: Thread) {
+pub fn set(stack_guard: usize, thread: Thread) {
     THREAD_INFO.with(|c| assert!(c.borrow().is_none()));
     THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{
         stack_guard: stack_guard,
diff --git a/src/libstd/sys/common/thread_local.rs b/src/libstd/sys/common/thread_local.rs
index 5e2a138fa63..5995d7ac10f 100644
--- a/src/libstd/sys/common/thread_local.rs
+++ b/src/libstd/sys/common/thread_local.rs
@@ -178,7 +178,7 @@ impl StaticKey {
         }
     }
 
-    unsafe fn lazy_init(&self) -> uint {
+    unsafe fn lazy_init(&self) -> usize {
         // POSIX allows the key created here to be 0, but the compare_and_swap
         // below relies on using 0 as a sentinel value to check who won the
         // race to set the shared TLS key. As far as I know, there is no
@@ -197,9 +197,9 @@ impl StaticKey {
             key2
         };
         assert!(key != 0);
-        match self.inner.key.compare_and_swap(0, key as uint, Ordering::SeqCst) {
+        match self.inner.key.compare_and_swap(0, key as usize, Ordering::SeqCst) {
             // The CAS succeeded, so we've created the actual key
-            0 => key as uint,
+            0 => key as usize,
             // If someone beat us to the punch, use their key instead
             n => { imp::destroy(key); n }
         }
@@ -261,8 +261,8 @@ mod tests {
         assert!(k2.get().is_null());
         k1.set(1 as *mut _);
         k2.set(2 as *mut _);
-        assert_eq!(k1.get() as uint, 1);
-        assert_eq!(k2.get() as uint, 2);
+        assert_eq!(k1.get() as usize, 1);
+        assert_eq!(k2.get() as usize, 2);
     }
 
     #[test]
@@ -275,8 +275,8 @@ mod tests {
             assert!(K2.get().is_null());
             K1.set(1 as *mut _);
             K2.set(2 as *mut _);
-            assert_eq!(K1.get() as uint, 1);
-            assert_eq!(K2.get() as uint, 2);
+            assert_eq!(K1.get() as usize, 1);
+            assert_eq!(K2.get() as usize, 2);
         }
     }
 }
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index 0d83e4497f7..315df411179 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -158,7 +158,7 @@ impl Wtf8Buf {
 
     /// Create an new, empty WTF-8 string with pre-allocated capacity for `n` bytes.
     #[inline]
-    pub fn with_capacity(n: uint) -> Wtf8Buf {
+    pub fn with_capacity(n: usize) -> Wtf8Buf {
         Wtf8Buf { bytes: Vec::with_capacity(n) }
     }
 
@@ -214,7 +214,7 @@ impl Wtf8Buf {
             // Attempt to not use an intermediate buffer by just pushing bytes
             // directly onto this string.
             let slice = slice::from_raw_parts_mut(
-                self.bytes.as_mut_ptr().offset(cur_len as int),
+                self.bytes.as_mut_ptr().offset(cur_len as isize),
                 4
             );
             let used = encode_utf8_raw(code_point.value, mem::transmute(slice))
@@ -234,15 +234,15 @@ impl Wtf8Buf {
     ///
     /// # Panics
     ///
-    /// Panics if the new capacity overflows `uint`.
+    /// Panics if the new capacity overflows `usize`.
     #[inline]
-    pub fn reserve(&mut self, additional: uint) {
+    pub fn reserve(&mut self, additional: usize) {
         self.bytes.reserve(additional)
     }
 
     /// Returns the number of bytes that this string buffer can hold without reallocating.
     #[inline]
-    pub fn capacity(&self) -> uint {
+    pub fn capacity(&self) -> usize {
         self.bytes.capacity()
     }
 
@@ -313,7 +313,7 @@ impl Wtf8Buf {
     /// Panics if `new_len` > current length,
     /// or if `new_len` is not a code point boundary.
     #[inline]
-    pub fn truncate(&mut self, new_len: uint) {
+    pub fn truncate(&mut self, new_len: usize) {
         assert!(is_code_point_boundary(self, new_len));
         self.bytes.truncate(new_len)
     }
@@ -463,7 +463,7 @@ impl Wtf8 {
 
     /// Return the length, in WTF-8 bytes.
     #[inline]
-    pub fn len(&self) -> uint {
+    pub fn len(&self) -> usize {
         self.bytes.len()
     }
 
@@ -474,7 +474,7 @@ impl Wtf8 {
     ///
     /// Panics if `position` is beyond the end of the string.
     #[inline]
-    pub fn ascii_byte_at(&self, position: uint) -> u8 {
+    pub fn ascii_byte_at(&self, position: usize) -> u8 {
         match self.bytes[position] {
             ascii_byte @ 0x00 ... 0x7F => ascii_byte,
             _ => 0xFF
@@ -488,7 +488,7 @@ impl Wtf8 {
     /// Panics if `position` is not at a code point boundary,
     /// or is beyond the end of the string.
     #[inline]
-    pub fn code_point_at(&self, position: uint) -> CodePoint {
+    pub fn code_point_at(&self, position: usize) -> CodePoint {
         let (code_point, _) = self.code_point_range_at(position);
         code_point
     }
@@ -501,7 +501,7 @@ impl Wtf8 {
     /// Panics if `position` is not at a code point boundary,
     /// or is beyond the end of the string.
     #[inline]
-    pub fn code_point_range_at(&self, position: uint) -> (CodePoint, uint) {
+    pub fn code_point_range_at(&self, position: usize) -> (CodePoint, usize) {
         let (c, n) = char_range_at_raw(&self.bytes, position);
         (CodePoint { value: c }, n)
     }
@@ -570,7 +570,7 @@ impl Wtf8 {
     }
 
     #[inline]
-    fn next_surrogate(&self, mut pos: uint) -> Option<(uint, u16)> {
+    fn next_surrogate(&self, mut pos: usize) -> Option<(usize, u16)> {
         let mut iter = self.bytes[pos..].iter();
         loop {
             let b = match iter.next() {
@@ -713,7 +713,7 @@ fn decode_surrogate_pair(lead: u16, trail: u16) -> char {
 
 /// Copied from core::str::StrPrelude::is_char_boundary
 #[inline]
-pub fn is_code_point_boundary(slice: &Wtf8, index: uint) -> bool {
+pub fn is_code_point_boundary(slice: &Wtf8, index: usize) -> bool {
     if index == slice.len() { return true; }
     match slice.bytes.get(index) {
         None => false,
@@ -723,17 +723,17 @@ pub fn is_code_point_boundary(slice: &Wtf8, index: uint) -> bool {
 
 /// Copied from core::str::raw::slice_unchecked
 #[inline]
-pub unsafe fn slice_unchecked(s: &Wtf8, begin: uint, end: uint) -> &Wtf8 {
+pub unsafe fn slice_unchecked(s: &Wtf8, begin: usize, end: usize) -> &Wtf8 {
     // memory layout of an &[u8] and &Wtf8 are the same
     mem::transmute(slice::from_raw_parts(
-        s.bytes.as_ptr().offset(begin as int),
+        s.bytes.as_ptr().offset(begin as isize),
         end - begin
     ))
 }
 
 /// Copied from core::str::raw::slice_error_fail
 #[inline(never)]
-pub fn slice_error_fail(s: &Wtf8, begin: uint, end: uint) -> ! {
+pub fn slice_error_fail(s: &Wtf8, begin: usize, end: usize) -> ! {
     assert!(begin <= end);
     panic!("index {} and/or {} in `{:?}` do not lie on character boundary",
           begin, end, s);
@@ -756,7 +756,7 @@ impl<'a> Iterator for Wtf8CodePoints<'a> {
     }
 
     #[inline]
-    fn size_hint(&self) -> (uint, Option<uint>) {
+    fn size_hint(&self) -> (usize, Option<usize>) {
         let (len, _) = self.bytes.size_hint();
         (len.saturating_add(3) / 4, Some(len))
     }
@@ -790,7 +790,7 @@ impl<'a> Iterator for EncodeWide<'a> {
     }
 
     #[inline]
-    fn size_hint(&self) -> (uint, Option<uint>) {
+    fn size_hint(&self) -> (usize, Option<usize>) {
         let (low, high) = self.code_points.size_hint();
         // every code point gets either one u16 or two u16,
         // so this iterator is between 1 or 2 times as
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs
index 7db64cfb936..99a554a835f 100644
--- a/src/libstd/sys/unix/backtrace.rs
+++ b/src/libstd/sys/unix/backtrace.rs
@@ -122,13 +122,13 @@ pub fn write(w: &mut Write) -> io::Result<()> {
 
     try!(writeln!(w, "stack backtrace:"));
     // 100 lines should be enough
-    const SIZE: uint = 100;
+    const SIZE: usize = 100;
     let mut buf: [*mut libc::c_void; SIZE] = unsafe {mem::zeroed()};
-    let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as uint};
+    let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize};
 
     // skipping the first one as it is write itself
     let iter = (1..cnt).map(|i| {
-        print(w, i as int, buf[i], buf[i])
+        print(w, i as isize, buf[i], buf[i])
     });
     result::fold(iter, (), |_, _| ())
 }
@@ -138,7 +138,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
                  // tracing
 pub fn write(w: &mut Write) -> io::Result<()> {
     struct Context<'a> {
-        idx: int,
+        idx: isize,
         writer: &'a mut (Write+'a),
         last_error: Option<io::Error>,
     }
@@ -222,7 +222,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
 }
 
 #[cfg(any(target_os = "macos", target_os = "ios"))]
-fn print(w: &mut Write, idx: int, addr: *mut libc::c_void,
+fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void,
          _symaddr: *mut libc::c_void) -> io::Result<()> {
     use intrinsics;
     #[repr(C)]
@@ -248,7 +248,7 @@ fn print(w: &mut Write, idx: int, addr: *mut libc::c_void,
 }
 
 #[cfg(not(any(target_os = "macos", target_os = "ios")))]
-fn print(w: &mut Write, idx: int, addr: *mut libc::c_void,
+fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void,
          symaddr: *mut libc::c_void) -> io::Result<()> {
     use env;
     use ffi::AsOsStr;
@@ -441,7 +441,7 @@ fn print(w: &mut Write, idx: int, addr: *mut libc::c_void,
 }
 
 // Finally, after all that work above, we can emit a symbol.
-fn output(w: &mut Write, idx: int, addr: *mut libc::c_void,
+fn output(w: &mut Write, idx: isize, addr: *mut libc::c_void,
           s: Option<&[u8]>) -> io::Result<()> {
     try!(write!(w, "  {:2}: {:2$?} - ", idx, addr, HEX_WIDTH));
     match s.and_then(|s| str::from_utf8(s).ok()) {
diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs
index 4e9f9c80a18..2514d4bf4a3 100644
--- a/src/libstd/sys/unix/c.rs
+++ b/src/libstd/sys/unix/c.rs
@@ -167,7 +167,7 @@ extern {
 
 #[cfg(any(target_os = "macos", target_os = "ios"))]
 mod select {
-    pub const FD_SETSIZE: uint = 1024;
+    pub const FD_SETSIZE: usize = 1024;
 
     #[repr(C)]
     pub struct fd_set {
@@ -175,7 +175,7 @@ mod select {
     }
 
     pub fn fd_set(set: &mut fd_set, fd: i32) {
-        set.fds_bits[(fd / 32) as uint] |= 1 << ((fd % 32) as uint);
+        set.fds_bits[(fd / 32) as usize] |= 1 << ((fd % 32) as usize);
     }
 }
 
@@ -198,7 +198,7 @@ mod select {
     }
 
     pub fn fd_set(set: &mut fd_set, fd: i32) {
-        let fd = fd as uint;
+        let fd = fd as usize;
         set.fds_bits[fd / usize::BITS as usize] |= 1 << (fd % usize::BITS as usize);
     }
 }
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs
index 327ff3953aa..2569653811f 100644
--- a/src/libstd/sys/unix/fs.rs
+++ b/src/libstd/sys/unix/fs.rs
@@ -42,7 +42,7 @@ impl FileDesc {
         FileDesc { fd: fd, close_on_drop: close_on_drop }
     }
 
-    pub fn read(&self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&self, buf: &mut [u8]) -> IoResult<usize> {
         let ret = retry(|| unsafe {
             libc::read(self.fd(),
                        buf.as_mut_ptr() as *mut libc::c_void,
@@ -53,7 +53,7 @@ impl FileDesc {
         } else if ret < 0 {
             Err(super::last_error())
         } else {
-            Ok(ret as uint)
+            Ok(ret as usize)
         }
     }
     pub fn write(&self, buf: &[u8]) -> IoResult<()> {
@@ -181,7 +181,7 @@ pub fn open(path: &Path, fm: FileMode, fa: FileAccess) -> IoResult<FileDesc> {
     }
 }
 
-pub fn mkdir(p: &Path, mode: uint) -> IoResult<()> {
+pub fn mkdir(p: &Path, mode: usize) -> IoResult<()> {
     let p = try!(cstr(p));
     mkerr_libc(unsafe { libc::mkdir(p.as_ptr(), mode as libc::mode_t) })
 }
@@ -204,13 +204,13 @@ pub fn readdir(p: &Path) -> IoResult<Vec<Path>> {
     }
 
     let size = unsafe { rust_dirent_t_size() };
-    let mut buf = Vec::<u8>::with_capacity(size as uint);
+    let mut buf = Vec::<u8>::with_capacity(size as usize);
     let ptr = buf.as_mut_ptr() as *mut dirent_t;
 
     let p = try!(CString::new(p.as_vec()));
     let dir_ptr = unsafe {opendir(p.as_ptr())};
 
-    if dir_ptr as uint != 0 {
+    if dir_ptr as usize != 0 {
         let mut paths = vec!();
         let mut entry_ptr = ptr::null_mut();
         while unsafe { readdir_r(dir_ptr, ptr, &mut entry_ptr) == 0 } {
@@ -239,7 +239,7 @@ pub fn rename(old: &Path, new: &Path) -> IoResult<()> {
     })
 }
 
-pub fn chmod(p: &Path, mode: uint) -> IoResult<()> {
+pub fn chmod(p: &Path, mode: usize) -> IoResult<()> {
     let p = try!(cstr(p));
     mkerr_libc(retry(|| unsafe {
         libc::chmod(p.as_ptr(), mode as libc::mode_t)
@@ -251,7 +251,7 @@ pub fn rmdir(p: &Path) -> IoResult<()> {
     mkerr_libc(unsafe { libc::rmdir(p.as_ptr()) })
 }
 
-pub fn chown(p: &Path, uid: int, gid: int) -> IoResult<()> {
+pub fn chown(p: &Path, uid: isize, gid: isize) -> IoResult<()> {
     let p = try!(cstr(p));
     mkerr_libc(retry(|| unsafe {
         libc::chown(p.as_ptr(), uid as libc::uid_t, gid as libc::gid_t)
@@ -265,7 +265,7 @@ pub fn readlink(p: &Path) -> IoResult<Path> {
     if len == -1 {
         len = 1024; // FIXME: read PATH_MAX from C ffi?
     }
-    let mut buf: Vec<u8> = Vec::with_capacity(len as uint);
+    let mut buf: Vec<u8> = Vec::with_capacity(len as usize);
     match unsafe {
         libc::readlink(p, buf.as_ptr() as *mut libc::c_char,
                        len as libc::size_t) as libc::c_int
@@ -273,7 +273,7 @@ pub fn readlink(p: &Path) -> IoResult<Path> {
         -1 => Err(super::last_error()),
         n => {
             assert!(n > 0);
-            unsafe { buf.set_len(n as uint); }
+            unsafe { buf.set_len(n as usize); }
             Ok(Path::new(buf))
         }
     }
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index c73d30d543a..fab443feebd 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -199,13 +199,13 @@ pub fn current_exe() -> io::Result<PathBuf> {
                          0 as libc::size_t);
         if err != 0 { return Err(io::Error::last_os_error()); }
         if sz == 0 { return Err(io::Error::last_os_error()); }
-        let mut v: Vec<u8> = Vec::with_capacity(sz as uint);
+        let mut v: Vec<u8> = Vec::with_capacity(sz as usize);
         let err = sysctl(mib.as_mut_ptr(), mib.len() as ::libc::c_uint,
                          v.as_mut_ptr() as *mut libc::c_void, &mut sz,
                          ptr::null_mut(), 0 as libc::size_t);
         if err != 0 { return Err(io::Error::last_os_error()); }
         if sz == 0 { return Err(io::Error::last_os_error()); }
-        v.set_len(sz as uint - 1); // chop off trailing NUL
+        v.set_len(sz as usize - 1); // chop off trailing NUL
         Ok(PathBuf::from(OsString::from_vec(v)))
     }
 }
@@ -249,10 +249,10 @@ pub fn current_exe() -> io::Result<PathBuf> {
         let mut sz: u32 = 0;
         _NSGetExecutablePath(ptr::null_mut(), &mut sz);
         if sz == 0 { return Err(io::Error::last_os_error()); }
-        let mut v: Vec<u8> = Vec::with_capacity(sz as uint);
+        let mut v: Vec<u8> = Vec::with_capacity(sz as usize);
         let err = _NSGetExecutablePath(v.as_mut_ptr() as *mut i8, &mut sz);
         if err != 0 { return Err(io::Error::last_os_error()); }
-        v.set_len(sz as uint - 1); // chop off trailing NUL
+        v.set_len(sz as usize - 1); // chop off trailing NUL
         Ok(PathBuf::from(OsString::from_vec(v)))
     }
 }
@@ -339,7 +339,7 @@ pub fn args() -> Args {
         let info = objc_msgSend(klass, process_info_sel);
         let args = objc_msgSend(info, arguments_sel);
 
-        let cnt: int = mem::transmute(objc_msgSend(args, count_sel));
+        let cnt: usize = mem::transmute(objc_msgSend(args, count_sel));
         for i in (0..cnt) {
             let tmp = objc_msgSend(args, object_at_sel, i);
             let utf_c_str: *const libc::c_char =
diff --git a/src/libstd/sys/unix/os_str.rs b/src/libstd/sys/unix/os_str.rs
index 3b8d18d87a0..69d876a48a4 100644
--- a/src/libstd/sys/unix/os_str.rs
+++ b/src/libstd/sys/unix/os_str.rs
@@ -46,10 +46,6 @@ impl Buf {
         Buf { inner: s.into_bytes() }
     }
 
-    pub fn from_str(s: &str) -> Buf {
-        Buf { inner: s.as_bytes().to_vec() }
-    }
-
     pub fn as_slice(&self) -> &Slice {
         unsafe { mem::transmute(&*self.inner) }
     }
diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs
index daa981720f6..f0071295bf2 100644
--- a/src/libstd/sys/unix/pipe.rs
+++ b/src/libstd/sys/unix/pipe.rs
@@ -151,7 +151,7 @@ impl UnixStream {
         ret
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         let fd = self.fd();
         let dolock = || self.lock_nonblocking();
         let doread = |nb| unsafe {
@@ -167,7 +167,7 @@ impl UnixStream {
     pub fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         let fd = self.fd();
         let dolock = || self.lock_nonblocking();
-        let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe {
+        let dowrite = |nb: bool, buf: *const u8, len: usize| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::send(fd,
                        buf as *const _,
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index df0e8de3ff1..0d35ace185d 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -49,11 +49,11 @@ impl Process {
         self.pid
     }
 
-    pub unsafe fn kill(&self, signal: int) -> IoResult<()> {
+    pub unsafe fn kill(&self, signal: isize) -> IoResult<()> {
         Process::killpid(self.pid, signal)
     }
 
-    pub unsafe fn killpid(pid: pid_t, signal: int) -> IoResult<()> {
+    pub unsafe fn killpid(pid: pid_t, signal: isize) -> IoResult<()> {
         let r = libc::funcs::posix88::signal::kill(pid, signal as c_int);
         mkerr_libc(r)
     }
@@ -454,7 +454,7 @@ impl Process {
                 // with process timeouts, but libgreen should get there first
                 // (currently libuv doesn't handle old signal handlers).
                 if drain(read_fd) {
-                    let i: uint = unsafe { mem::transmute(old.sa_handler) };
+                    let i: usize = unsafe { mem::transmute(old.sa_handler) };
                     if i != 0 {
                         assert!(old.sa_flags & c::SA_SIGINFO == 0);
                         (old.sa_handler)(c::SIGCHLD);
@@ -618,8 +618,8 @@ fn translate_status(status: c_int) -> ProcessExit {
     }
 
     if imp::WIFEXITED(status) {
-        ExitStatus(imp::WEXITSTATUS(status) as int)
+        ExitStatus(imp::WEXITSTATUS(status) as isize)
     } else {
-        ExitSignal(imp::WTERMSIG(status) as int)
+        ExitSignal(imp::WTERMSIG(status) as isize)
     }
 }
diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs
index 35706682047..6887095c53a 100644
--- a/src/libstd/sys/unix/stack_overflow.rs
+++ b/src/libstd/sys/unix/stack_overflow.rs
@@ -60,7 +60,7 @@ mod imp {
 
 
     // This is initialized in init() and only read from after
-    static mut PAGE_SIZE: uint = 0;
+    static mut PAGE_SIZE: usize = 0;
 
     #[no_stack_check]
     unsafe extern fn signal_handler(signum: libc::c_int,
@@ -82,7 +82,7 @@ mod imp {
         stack::record_sp_limit(0);
 
         let guard = thread_info::stack_guard();
-        let addr = (*info).si_addr as uint;
+        let addr = (*info).si_addr as usize;
 
         if guard == 0 || addr < guard - PAGE_SIZE || addr >= guard {
             term(signum);
@@ -101,7 +101,7 @@ mod imp {
             panic!("failed to get page size");
         }
 
-        PAGE_SIZE = psize as uint;
+        PAGE_SIZE = psize as usize;
 
         let mut action: sigaction = mem::zeroed();
         action.sa_flags = SA_SIGINFO | SA_ONSTACK;
diff --git a/src/libstd/sys/unix/sync.rs b/src/libstd/sys/unix/sync.rs
index c7d704922cb..3c05fd602be 100644
--- a/src/libstd/sys/unix/sync.rs
+++ b/src/libstd/sys/unix/sync.rs
@@ -66,24 +66,24 @@ mod os {
 
     #[cfg(any(target_arch = "x86_64",
               target_arch = "aarch64"))]
-    const __PTHREAD_MUTEX_SIZE__: uint = 56;
+    const __PTHREAD_MUTEX_SIZE__: usize = 56;
     #[cfg(any(target_arch = "x86",
               target_arch = "arm"))]
-    const __PTHREAD_MUTEX_SIZE__: uint = 40;
+    const __PTHREAD_MUTEX_SIZE__: usize = 40;
 
     #[cfg(any(target_arch = "x86_64",
               target_arch = "aarch64"))]
-    const __PTHREAD_COND_SIZE__: uint = 40;
+    const __PTHREAD_COND_SIZE__: usize = 40;
     #[cfg(any(target_arch = "x86",
               target_arch = "arm"))]
-    const __PTHREAD_COND_SIZE__: uint = 24;
+    const __PTHREAD_COND_SIZE__: usize = 24;
 
     #[cfg(any(target_arch = "x86_64",
               target_arch = "aarch64"))]
-    const __PTHREAD_RWLOCK_SIZE__: uint = 192;
+    const __PTHREAD_RWLOCK_SIZE__: usize = 192;
     #[cfg(any(target_arch = "x86",
               target_arch = "arm"))]
-    const __PTHREAD_RWLOCK_SIZE__: uint = 124;
+    const __PTHREAD_RWLOCK_SIZE__: usize = 124;
 
     const _PTHREAD_MUTEX_SIG_INIT: libc::c_long = 0x32AAABA7;
     const _PTHREAD_COND_SIG_INIT: libc::c_long = 0x3CB0B1BB;
@@ -125,15 +125,15 @@ mod os {
 
     // minus 8 because we have an 'align' field
     #[cfg(target_arch = "x86_64")]
-    const __SIZEOF_PTHREAD_MUTEX_T: uint = 40 - 8;
+    const __SIZEOF_PTHREAD_MUTEX_T: usize = 40 - 8;
     #[cfg(any(target_arch = "x86",
               target_arch = "arm",
               target_arch = "mips",
               target_arch = "mipsel",
               target_arch = "powerpc"))]
-    const __SIZEOF_PTHREAD_MUTEX_T: uint = 24 - 8;
+    const __SIZEOF_PTHREAD_MUTEX_T: usize = 24 - 8;
     #[cfg(target_arch = "aarch64")]
-    const __SIZEOF_PTHREAD_MUTEX_T: uint = 48 - 8;
+    const __SIZEOF_PTHREAD_MUTEX_T: usize = 48 - 8;
 
     #[cfg(any(target_arch = "x86_64",
               target_arch = "x86",
@@ -142,18 +142,18 @@ mod os {
               target_arch = "mips",
               target_arch = "mipsel",
               target_arch = "powerpc"))]
-    const __SIZEOF_PTHREAD_COND_T: uint = 48 - 8;
+    const __SIZEOF_PTHREAD_COND_T: usize = 48 - 8;
 
     #[cfg(any(target_arch = "x86_64",
               target_arch = "aarch64"))]
-    const __SIZEOF_PTHREAD_RWLOCK_T: uint = 56 - 8;
+    const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56 - 8;
 
     #[cfg(any(target_arch = "x86",
               target_arch = "arm",
               target_arch = "mips",
               target_arch = "mipsel",
               target_arch = "powerpc"))]
-    const __SIZEOF_PTHREAD_RWLOCK_T: uint = 32 - 8;
+    const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32 - 8;
 
     #[repr(C)]
     pub struct pthread_mutex_t {
diff --git a/src/libstd/sys/unix/tcp.rs b/src/libstd/sys/unix/tcp.rs
index 2a6994824c7..a9f2198208b 100644
--- a/src/libstd/sys/unix/tcp.rs
+++ b/src/libstd/sys/unix/tcp.rs
@@ -64,7 +64,7 @@ impl TcpListener {
 
     pub fn fd(&self) -> sock_t { self.inner.fd() }
 
-    pub fn listen(self, backlog: int) -> IoResult<TcpAcceptor> {
+    pub fn listen(self, backlog: isize) -> IoResult<TcpAcceptor> {
         match unsafe { libc::listen(self.fd(), backlog as libc::c_int) } {
             -1 => Err(last_net_error()),
             _ => {
diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs
index b6d2aca9a52..d9a162302fc 100644
--- a/src/libstd/sys/unix/timer.rs
+++ b/src/libstd/sys/unix/timer.rs
@@ -69,7 +69,7 @@ pub trait Callback {
 }
 
 pub struct Timer {
-    id: uint,
+    id: usize,
     inner: Option<Box<Inner>>,
 }
 
@@ -78,7 +78,7 @@ pub struct Inner {
     interval: u64,
     repeat: bool,
     target: u64,
-    id: uint,
+    id: usize,
 }
 
 pub enum Req {
@@ -87,7 +87,7 @@ pub enum Req {
 
     // Remove a timer based on its id and then send it back on the channel
     // provided
-    RemoveTimer(uint, Sender<Box<Inner>>),
+    RemoveTimer(usize, Sender<Box<Inner>>),
 }
 
 // returns the current time (in milliseconds)
@@ -121,7 +121,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
 
     // signals the first requests in the queue, possible re-enqueueing it.
     fn signal(active: &mut Vec<Box<Inner>>,
-              dead: &mut Vec<(uint, Box<Inner>)>) {
+              dead: &mut Vec<(usize, Box<Inner>)>) {
         if active.is_empty() { return }
 
         let mut timer = active.remove(0);
@@ -216,7 +216,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
 
 impl Timer {
     pub fn new() -> IoResult<Timer> {
-        // See notes above regarding using int return value
+        // See notes above regarding using isize return value
         // instead of ()
         HELPER.boot(|| {}, helper);
 
@@ -244,7 +244,7 @@ impl Timer {
             tv_nsec: ((ms % 1000) * 1000000) as libc::c_long,
         };
         while unsafe { libc::nanosleep(&to_sleep, &mut to_sleep) } != 0 {
-            if os::errno() as int != libc::EINTR as int {
+            if os::errno() as isize != libc::EINTR as isize {
                 panic!("failed to sleep, but not because of EINTR?");
             }
         }
diff --git a/src/libstd/sys/unix/tty.rs b/src/libstd/sys/unix/tty.rs
index e4973a8f9f3..2f6fd713bfb 100644
--- a/src/libstd/sys/unix/tty.rs
+++ b/src/libstd/sys/unix/tty.rs
@@ -46,7 +46,7 @@ impl TTY {
         }
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         self.fd.read(buf)
     }
     pub fn write(&mut self, buf: &[u8]) -> IoResult<()> {
@@ -56,7 +56,7 @@ impl TTY {
         Err(sys_common::unimpl())
     }
 
-    pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
+    pub fn get_winsize(&mut self) -> IoResult<(isize, isize)> {
         unsafe {
             #[repr(C)]
             struct winsize {
@@ -74,7 +74,7 @@ impl TTY {
                     detail: None,
                 })
             } else {
-                Ok((size.ws_col as int, size.ws_row as int))
+                Ok((size.ws_col as isize, size.ws_row as isize))
             }
         }
     }
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs
index ffa4b37b487..385834a6226 100644
--- a/src/libstd/sys/windows/backtrace.rs
+++ b/src/libstd/sys/windows/backtrace.rs
@@ -23,7 +23,6 @@
 //! this takes the route of using StackWalk64 in order to walk the stack.
 
 #![allow(dead_code)]
-#![allow(deprecated)] // for old path for dynamic lib
 
 use prelude::v1::*;
 use io::prelude::*;
@@ -34,7 +33,7 @@ use intrinsics;
 use io;
 use libc;
 use mem;
-use old_path::Path;
+use path::Path;
 use ptr;
 use str;
 use sync::{StaticMutex, MUTEX_INIT};
@@ -63,7 +62,7 @@ type StackWalk64Fn =
                        *mut libc::c_void, *mut libc::c_void,
                        *mut libc::c_void, *mut libc::c_void) -> libc::BOOL;
 
-const MAX_SYM_NAME: uint = 2000;
+const MAX_SYM_NAME: usize = 2000;
 const IMAGE_FILE_MACHINE_I386: libc::DWORD = 0x014c;
 const IMAGE_FILE_MACHINE_IA64: libc::DWORD = 0x0200;
 const IMAGE_FILE_MACHINE_AMD64: libc::DWORD = 0x8664;
@@ -138,7 +137,7 @@ struct KDHELP64 {
 mod arch {
     use libc;
 
-    const MAXIMUM_SUPPORTED_EXTENSION: uint = 512;
+    const MAXIMUM_SUPPORTED_EXTENSION: usize = 512;
 
     #[repr(C)]
     pub struct CONTEXT {
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index e7a01478908..3330130c770 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -42,7 +42,7 @@ impl FileDesc {
         FileDesc { fd: fd, close_on_drop: close_on_drop }
     }
 
-    pub fn read(&self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&self, buf: &mut [u8]) -> IoResult<usize> {
         let mut read = 0;
         let ret = unsafe {
             libc::ReadFile(self.handle(), buf.as_ptr() as libc::LPVOID,
@@ -50,7 +50,7 @@ impl FileDesc {
                            ptr::null_mut())
         };
         if ret != 0 {
-            Ok(read as uint)
+            Ok(read as usize)
         } else {
             Err(super::last_error())
         }
@@ -67,8 +67,8 @@ impl FileDesc {
                                 ptr::null_mut())
             };
             if ret != 0 {
-                remaining -= amt as uint;
-                cur = unsafe { cur.offset(amt as int) };
+                remaining -= amt as usize;
+                cur = unsafe { cur.offset(amt as isize) };
             } else {
                 return Err(super::last_error())
             }
@@ -234,7 +234,7 @@ pub fn open(path: &Path, fm: FileMode, fa: FileAccess) -> IoResult<FileDesc> {
     }
 }
 
-pub fn mkdir(p: &Path, _mode: uint) -> IoResult<()> {
+pub fn mkdir(p: &Path, _mode: usize) -> IoResult<()> {
     let p = try!(to_utf16(p));
     super::mkerr_winbool(unsafe {
         // FIXME: turn mode into something useful? #2623
@@ -308,11 +308,11 @@ pub fn unlink(p: &Path) -> IoResult<()> {
                 };
                 if stat.perm.intersects(old_io::USER_WRITE) { return Err(e) }
 
-                match chmod(p, (stat.perm | old_io::USER_WRITE).bits() as uint) {
+                match chmod(p, (stat.perm | old_io::USER_WRITE).bits() as usize) {
                     Ok(()) => do_unlink(&p_utf16),
                     Err(..) => {
                         // Try to put it back as we found it
-                        let _ = chmod(p, stat.perm.bits() as uint);
+                        let _ = chmod(p, stat.perm.bits() as usize);
                         Err(e)
                     }
                 }
@@ -331,7 +331,7 @@ pub fn rename(old: &Path, new: &Path) -> IoResult<()> {
     })
 }
 
-pub fn chmod(p: &Path, mode: uint) -> IoResult<()> {
+pub fn chmod(p: &Path, mode: usize) -> IoResult<()> {
     let p = try!(to_utf16(p));
     mkerr_libc(unsafe {
         libc::wchmod(p.as_ptr(), mode as libc::c_int)
@@ -343,7 +343,7 @@ pub fn rmdir(p: &Path) -> IoResult<()> {
     super::mkerr_winbool(unsafe { libc::RemoveDirectoryW(p.as_ptr()) })
 }
 
-pub fn chown(_p: &Path, _uid: int, _gid: int) -> IoResult<()> {
+pub fn chown(_p: &Path, _uid: isize, _gid: isize) -> IoResult<()> {
     // libuv has this as a no-op, so seems like this should as well?
     Ok(())
 }
diff --git a/src/libstd/sys/windows/os_str.rs b/src/libstd/sys/windows/os_str.rs
index ad1e6c4b0e7..91905ae7489 100644
--- a/src/libstd/sys/windows/os_str.rs
+++ b/src/libstd/sys/windows/os_str.rs
@@ -45,10 +45,6 @@ impl Buf {
         Buf { inner: Wtf8Buf::from_string(s) }
     }
 
-    pub fn from_str(s: &str) -> Buf {
-        Buf { inner: Wtf8Buf::from_str(s) }
-    }
-
     pub fn as_slice(&self) -> &Slice {
         unsafe { mem::transmute(self.inner.as_slice()) }
     }
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index 17fdd6755c6..064c003bd15 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -115,7 +115,7 @@ impl Event {
                                initial_state as libc::BOOL,
                                ptr::null())
         };
-        if event as uint == 0 {
+        if event as usize == 0 {
             Err(super::last_error())
         } else {
             Ok(Event(event))
@@ -181,7 +181,7 @@ unsafe fn pipe(name: *const u16, init: bool) -> libc::HANDLE {
 }
 
 pub fn await(handle: libc::HANDLE, deadline: u64,
-             events: &[libc::HANDLE]) -> IoResult<uint> {
+             events: &[libc::HANDLE]) -> IoResult<usize> {
     use libc::consts::os::extra::{WAIT_FAILED, WAIT_TIMEOUT, WAIT_OBJECT_0};
 
     // If we've got a timeout, use WaitForSingleObject in tandem with CancelIo
@@ -204,7 +204,7 @@ pub fn await(handle: libc::HANDLE, deadline: u64,
             let _ = c::CancelIo(handle);
             Err(sys_common::timeout("operation timed out"))
         },
-        n => Ok((n - WAIT_OBJECT_0) as uint)
+        n => Ok((n - WAIT_OBJECT_0) as usize)
     }
 }
 
@@ -314,7 +314,7 @@ impl UnixStream {
             // `WaitNamedPipe` function, and this is indicated with an error
             // code of ERROR_PIPE_BUSY.
             let code = unsafe { libc::GetLastError() };
-            if code as int != libc::ERROR_PIPE_BUSY as int {
+            if code as isize != libc::ERROR_PIPE_BUSY as isize {
                 return Err(super::last_error())
             }
 
@@ -362,7 +362,7 @@ impl UnixStream {
         }
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         if self.read.is_none() {
             self.read = Some(try!(Event::new(true, false)));
         }
@@ -390,7 +390,7 @@ impl UnixStream {
                            &mut bytes_read,
                            &mut overlapped)
         };
-        if ret != 0 { return Ok(bytes_read as uint) }
+        if ret != 0 { return Ok(bytes_read as usize) }
 
         // If our errno doesn't say that the I/O is pending, then we hit some
         // legitimate error and return immediately.
@@ -418,7 +418,7 @@ impl UnixStream {
             };
             // If we succeeded, or we failed for some reason other than
             // CancelIoEx, return immediately
-            if ret != 0 { return Ok(bytes_read as uint) }
+            if ret != 0 { return Ok(bytes_read as usize) }
             if os::errno() != libc::ERROR_OPERATION_ABORTED as i32 {
                 return Err(super::last_error())
             }
@@ -487,7 +487,7 @@ impl UnixStream {
                         return Err(super::last_error())
                     }
                     if !wait_succeeded.is_ok() {
-                        let amt = offset + bytes_written as uint;
+                        let amt = offset + bytes_written as usize;
                         return if amt > 0 {
                             Err(IoError {
                                 kind: old_io::ShortWrite(amt),
@@ -504,7 +504,7 @@ impl UnixStream {
                     continue // retry
                 }
             }
-            offset += bytes_written as uint;
+            offset += bytes_written as usize;
         }
         Ok(())
     }
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index e08a6e6b3cd..297f6e173ab 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -63,11 +63,11 @@ impl Process {
         self.pid
     }
 
-    pub unsafe fn kill(&self, signal: int) -> IoResult<()> {
+    pub unsafe fn kill(&self, signal: isize) -> IoResult<()> {
         Process::killpid(self.pid, signal)
     }
 
-    pub unsafe fn killpid(pid: pid_t, signal: int) -> IoResult<()> {
+    pub unsafe fn killpid(pid: pid_t, signal: isize) -> IoResult<()> {
         let handle = libc::OpenProcess(libc::PROCESS_TERMINATE |
                                        libc::PROCESS_QUERY_INFORMATION,
                                        libc::FALSE, pid as libc::DWORD);
@@ -309,7 +309,7 @@ impl Process {
                 }
                 if status != STILL_ACTIVE {
                     assert!(CloseHandle(process) != 0);
-                    return Ok(ExitStatus(status as int));
+                    return Ok(ExitStatus(status as isize));
                 }
                 let interval = if deadline == 0 {
                     INFINITE
@@ -394,7 +394,7 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
         }
     }
 
-    fn append_char_at(cmd: &mut String, arg: &[char], i: uint) {
+    fn append_char_at(cmd: &mut String, arg: &[char], i: usize) {
         match arg[i] {
             '"' => {
                 // Escape quotes.
@@ -415,7 +415,7 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
         }
     }
 
-    fn backslash_run_ends_in_quote(s: &[char], mut i: uint) -> bool {
+    fn backslash_run_ends_in_quote(s: &[char], mut i: usize) -> bool {
         while i < s.len() && s[i] == '\\' {
             i += 1;
         }
diff --git a/src/libstd/sys/windows/process2.rs b/src/libstd/sys/windows/process2.rs
index 4c2777459dd..9e9bb86446e 100644
--- a/src/libstd/sys/windows/process2.rs
+++ b/src/libstd/sys/windows/process2.rs
@@ -127,7 +127,7 @@ impl Process {
 
         use env::split_paths;
         use mem;
-        use iter::IteratorExt;
+        use iter::Iterator;
 
         // To have the spawning semantics of unix/windows stay the same, we need to
         // read the *child's* PATH if one is provided. See #15149 for more details.
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs
index b0410701ee1..79b7de4f341 100644
--- a/src/libstd/sys/windows/stack_overflow.rs
+++ b/src/libstd/sys/windows/stack_overflow.rs
@@ -31,7 +31,7 @@ impl Drop for Handler {
 }
 
 // This is initialized in init() and only read from after
-static mut PAGE_SIZE: uint = 0;
+static mut PAGE_SIZE: usize = 0;
 
 #[no_stack_check]
 extern "system" fn vectored_handler(ExceptionInfo: *mut EXCEPTION_POINTERS) -> LONG {
@@ -56,7 +56,7 @@ extern "system" fn vectored_handler(ExceptionInfo: *mut EXCEPTION_POINTERS) -> L
 pub unsafe fn init() {
     let mut info = mem::zeroed();
     libc::GetSystemInfo(&mut info);
-    PAGE_SIZE = info.dwPageSize as uint;
+    PAGE_SIZE = info.dwPageSize as usize;
 
     if AddVectoredExceptionHandler(0, vectored_handler) == ptr::null_mut() {
         panic!("failed to install exception handler");
@@ -96,7 +96,7 @@ pub type PVECTORED_EXCEPTION_HANDLER = extern "system"
 pub type ULONG = libc::c_ulong;
 
 const EXCEPTION_CONTINUE_SEARCH: LONG = 0;
-const EXCEPTION_MAXIMUM_PARAMETERS: uint = 15;
+const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15;
 const EXCEPTION_STACK_OVERFLOW: DWORD = 0xc00000fd;
 
 extern "system" {
diff --git a/src/libstd/sys/windows/tcp.rs b/src/libstd/sys/windows/tcp.rs
index 6e46bf97d1b..2ac8ac10aa9 100644
--- a/src/libstd/sys/windows/tcp.rs
+++ b/src/libstd/sys/windows/tcp.rs
@@ -77,7 +77,7 @@ impl TcpListener {
 
     pub fn socket(&self) -> sock_t { self.sock }
 
-    pub fn listen(self, backlog: int) -> IoResult<TcpAcceptor> {
+    pub fn listen(self, backlog: isize) -> IoResult<TcpAcceptor> {
         match unsafe { libc::listen(self.socket(), backlog as libc::c_int) } {
             -1 => Err(last_net_error()),
 
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index d1d4ad90081..98e4a737c7b 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -25,8 +25,8 @@ use time::Duration;
 pub type rust_thread = HANDLE;
 
 pub mod guard {
-    pub unsafe fn main() -> uint { 0 }
-    pub unsafe fn current() -> uint { 0 }
+    pub unsafe fn main() -> usize { 0 }
+    pub unsafe fn current() -> usize { 0 }
     pub unsafe fn init() {}
 }
 
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs
index c908c791247..cbabab8acb7 100644
--- a/src/libstd/sys/windows/thread_local.rs
+++ b/src/libstd/sys/windows/thread_local.rs
@@ -139,7 +139,7 @@ unsafe fn init_dtors() {
         let dtors = DTORS;
         DTORS = 1 as *mut _;
         Box::from_raw(dtors);
-        assert!(DTORS as uint == 1); // can't re-init after destructing
+        assert!(DTORS as usize == 1); // can't re-init after destructing
         DTOR_LOCK.unlock();
     });
     if res.is_ok() {
@@ -152,8 +152,8 @@ unsafe fn init_dtors() {
 unsafe fn register_dtor(key: Key, dtor: Dtor) {
     DTOR_LOCK.lock();
     init_dtors();
-    assert!(DTORS as uint != 0);
-    assert!(DTORS as uint != 1,
+    assert!(DTORS as usize != 0);
+    assert!(DTORS as usize != 1,
             "cannot create new TLS keys after the main thread has exited");
     (*DTORS).push((key, dtor));
     DTOR_LOCK.unlock();
@@ -162,8 +162,8 @@ unsafe fn register_dtor(key: Key, dtor: Dtor) {
 unsafe fn unregister_dtor(key: Key) -> bool {
     DTOR_LOCK.lock();
     init_dtors();
-    assert!(DTORS as uint != 0);
-    assert!(DTORS as uint != 1,
+    assert!(DTORS as usize != 0);
+    assert!(DTORS as usize != 1,
             "cannot unregister destructors after the main thread has exited");
     let ret = {
         let dtors = &mut *DTORS;
diff --git a/src/libstd/sys/windows/timer.rs b/src/libstd/sys/windows/timer.rs
index 9bcae926eea..8856cc26b2e 100644
--- a/src/libstd/sys/windows/timer.rs
+++ b/src/libstd/sys/windows/timer.rs
@@ -91,13 +91,13 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>, _: ()) {
             }
         } else {
             let remove = {
-                match &mut chans[idx as uint - 1] {
+                match &mut chans[idx as usize - 1] {
                     &mut (ref mut c, oneshot) => { c.call(); oneshot }
                 }
             };
             if remove {
-                drop(objs.remove(idx as uint));
-                drop(chans.remove(idx as uint - 1));
+                drop(objs.remove(idx as usize));
+                drop(chans.remove(idx as usize - 1));
             }
         }
     }
diff --git a/src/libstd/sys/windows/tty.rs b/src/libstd/sys/windows/tty.rs
index 52f4cce4aa3..791c7532bd0 100644
--- a/src/libstd/sys/windows/tty.rs
+++ b/src/libstd/sys/windows/tty.rs
@@ -42,7 +42,7 @@ use super::c::{ENABLE_INSERT_MODE, ENABLE_LINE_INPUT};
 use super::c::{ENABLE_PROCESSED_INPUT, ENABLE_QUICK_EDIT_MODE};
 use super::c::CONSOLE_SCREEN_BUFFER_INFO;
 use super::c::{ReadConsoleW, WriteConsoleW, GetConsoleMode, SetConsoleMode};
-use super::c::{GetConsoleScreenBufferInfo};
+use super::c::GetConsoleScreenBufferInfo;
 
 fn invalid_encoding() -> IoError {
     IoError {
@@ -92,7 +92,7 @@ impl TTY {
         }
     }
 
-    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
+    pub fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
         // Read more if the buffer is empty
         if self.utf8.eof() {
             let mut utf16: Vec<u16> = repeat(0u16).take(0x1000).collect();
@@ -105,7 +105,7 @@ impl TTY {
                 0 => return Err(super::last_error()),
                 _ => (),
             };
-            utf16.truncate(num as uint);
+            utf16.truncate(num as usize);
             let utf8 = match String::from_utf16(&utf16) {
                 Ok(utf8) => utf8.into_bytes(),
                 Err(..) => return Err(invalid_encoding()),
@@ -149,12 +149,12 @@ impl TTY {
         }
     }
 
-    pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
+    pub fn get_winsize(&mut self) -> IoResult<(isize, isize)> {
         let mut info: CONSOLE_SCREEN_BUFFER_INFO = unsafe { mem::zeroed() };
         match unsafe { GetConsoleScreenBufferInfo(self.handle, &mut info as *mut _) } {
             0 => Err(super::last_error()),
-            _ => Ok(((info.srWindow.Right + 1 - info.srWindow.Left) as int,
-                     (info.srWindow.Bottom + 1 - info.srWindow.Top) as int)),
+            _ => Ok(((info.srWindow.Right + 1 - info.srWindow.Left) as isize,
+                     (info.srWindow.Bottom + 1 - info.srWindow.Top) as isize)),
         }
     }
 }
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 27b50fc9aaa..074030bd07b 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -434,6 +434,55 @@ pub fn panicking() -> bool {
     unwind::panicking()
 }
 
+/// Invoke a closure, capturing the cause of panic if one occurs.
+///
+/// This function will return `Ok(())` if the closure does not panic, and will
+/// return `Err(cause)` if the closure panics. The `cause` returned is the
+/// object with which panic was originally invoked.
+///
+/// It is currently undefined behavior to unwind from Rust code into foreign
+/// code, so this function is particularly useful when Rust is called from
+/// another language (normally C). This can run arbitrary Rust code, capturing a
+/// panic and allowing a graceful handling of the error.
+///
+/// It is **not** recommended to use this function for a general try/catch
+/// mechanism. The `Result` type is more appropriate to use for functions that
+/// can fail on a regular basis.
+///
+/// The closure provided is required to adhere to the `'static` bound to ensure
+/// that it cannot reference data in the parent stack frame, mitigating problems
+/// with exception safety. Furthermore, a `Send` bound is also required,
+/// providing the same safety guarantees as `thread::spawn` (ensuring the
+/// closure is properly isolated from the parent).
+///
+/// # Examples
+///
+/// ```
+/// # #![feature(catch_panic)]
+/// use std::thread;
+///
+/// let result = thread::catch_panic(|| {
+///     println!("hello!");
+/// });
+/// assert!(result.is_ok());
+///
+/// let result = thread::catch_panic(|| {
+///     panic!("oh no!");
+/// });
+/// assert!(result.is_err());
+/// ```
+#[unstable(feature = "catch_panic", reason = "recent API addition")]
+pub fn catch_panic<F, R>(f: F) -> Result<R>
+    where F: FnOnce() -> R + Send + 'static
+{
+    let mut result = None;
+    unsafe {
+        let result = &mut result;
+        try!(::rt::unwind::try(move || *result = Some(f())))
+    }
+    Ok(result.unwrap())
+}
+
 /// Put the current thread to sleep for the specified amount of time.
 ///
 /// The thread may sleep longer than the duration specified due to scheduling
@@ -821,13 +870,13 @@ mod test {
     }
 
     #[test]
-    #[should_fail]
+    #[should_panic]
     fn test_scoped_panic() {
         thread::scoped(|| panic!()).join();
     }
 
     #[test]
-    #[should_fail]
+    #[should_panic]
     fn test_scoped_implicit_panic() {
         let _ = thread::scoped(|| panic!());
     }