libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs
index 38289f6..8696573 100644
--- a/src/compiletest/common.rs
+++ b/src/compiletest/common.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 #[deriving(Eq)]
 pub enum mode {
     mode_compile_fail,
diff --git a/src/compiletest/compiletest.rc b/src/compiletest/compiletest.rc
index 5d703f6..f9ad0d5 100644
--- a/src/compiletest/compiletest.rc
+++ b/src/compiletest/compiletest.rc
@@ -12,11 +12,14 @@
 
 #[allow(non_camel_case_types)];
 
-extern mod std;
+#[no_std];
 
+extern mod core(name = "std", vers = "0.7-pre");
+extern mod std(name = "extra", vers = "0.7-pre");
+
+use core::prelude::*;
 use core::*;
 
-
 use std::getopts;
 use std::test;
 
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index aa8d610..297ec9e 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
 
 // Load any test directives embedded in the file
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index b1f4c9f..b3205a4 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use common;
 use common::config;
 
diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs
index 71efa55..2a4cd08 100644
--- a/src/compiletest/procsrv.rs
+++ b/src/compiletest/procsrv.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use core::libc::c_int;
 use core::run::spawn_process;
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index d58c2e5..da81df0 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use common::mode_run_pass;
 use common::mode_run_fail;
 use common::mode_compile_fail;
diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs
index 05e5d90..e9b09e8 100644
--- a/src/compiletest/util.rs
+++ b/src/compiletest/util.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use common::config;
 
 use core::os::getenv;
diff --git a/src/driver/driver.rs b/src/driver/driver.rs
index b8bd79e..97e01d1 100644
--- a/src/driver/driver.rs
+++ b/src/driver/driver.rs
@@ -8,6 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[no_core];
+#[no_std];
+
+extern mod core(name = "std", vers = "0.7-pre");
+
 #[cfg(rustpkg)]
 extern mod this(name = "rustpkg");
 
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs
index 9c7db35..087b28e 100644
--- a/src/libextra/arc.rs
+++ b/src/libextra/arc.rs
@@ -37,6 +37,8 @@
  * ~~~
  */
 
+use core::prelude::*;
+
 use sync;
 use sync::{Mutex, mutex_with_condvars, RWlock, rwlock_with_condvars};
 
diff --git a/src/libextra/arena.rs b/src/libextra/arena.rs
index a087a16..690993e 100644
--- a/src/libextra/arena.rs
+++ b/src/libextra/arena.rs
@@ -32,6 +32,8 @@
 // overhead when initializing plain-old-data and means we don't need
 // to waste time running the destructors of POD.
 
+use core::prelude::*;
+
 use list::{MutList, MutCons, MutNil};
 
 use core::at_vec;
diff --git a/src/libextra/base64.rs b/src/libextra/base64.rs
index a820862..e623740 100644
--- a/src/libextra/base64.rs
+++ b/src/libextra/base64.rs
@@ -10,6 +10,12 @@
 
 //! Base64 binary-to-text encoding
 
+use core::prelude::*;
+
+use core::old_iter;
+use core::str;
+use core::vec;
+
 pub trait ToBase64 {
     fn to_base64(&self) -> ~str;
 }
diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs
index 9d22107..c12ebf8 100644
--- a/src/libextra/bitv.rs
+++ b/src/libextra/bitv.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::vec::from_elem;
 
 struct SmallBitv {
diff --git a/src/libextra/c_vec.rs b/src/libextra/c_vec.rs
index e463e59..a8e7143 100644
--- a/src/libextra/c_vec.rs
+++ b/src/libextra/c_vec.rs
@@ -36,6 +36,8 @@
  * still held if needed.
  */
 
+use core::prelude::*;
+
 /**
  * The type representing a foreign chunk of memory
  *
diff --git a/src/libextra/comm.rs b/src/libextra/comm.rs
index 20ab2d6..095da65 100644
--- a/src/libextra/comm.rs
+++ b/src/libextra/comm.rs
@@ -14,6 +14,8 @@
 
 */
 
+use core::prelude::*;
+
 use core::comm::{GenericChan, GenericSmartChan, GenericPort};
 use core::comm::{Chan, Port, Selectable, Peekable};
 use core::pipes;
diff --git a/src/libextra/deque.rs b/src/libextra/deque.rs
index 60f1607..371b8ce 100644
--- a/src/libextra/deque.rs
+++ b/src/libextra/deque.rs
@@ -10,6 +10,8 @@
 
 //! A double-ended queue implemented as a circular buffer
 
+use core::prelude::*;
+
 use core::util::replace;
 
 static initial_capacity: uint = 32u; // 2^5
diff --git a/src/libextra/dlist.rs b/src/libextra/dlist.rs
index 57cd03e..c3ef1f2 100644
--- a/src/libextra/dlist.rs
+++ b/src/libextra/dlist.rs
@@ -18,6 +18,8 @@
 
 */
 
+use core::prelude::*;
+
 use core::managed;
 
 pub type DListLink<T> = Option<@mut DListNode<T>>;
diff --git a/src/libextra/ebml.rs b/src/libextra/ebml.rs
index a7c18eb..762328a 100644
--- a/src/libextra/ebml.rs
+++ b/src/libextra/ebml.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 // Simple Extensible Binary Markup Language (ebml) reader and writer on a
 // cursor model. See the specification here:
 //     http://www.matroska.org/technical/specs/rfc/index.html
@@ -65,6 +67,8 @@
 // --------------------------------------
 
 pub mod reader {
+    use core::prelude::*;
+
     use ebml::{Doc, EbmlEncoderTag, EsBool, EsEnum, EsEnumBody, EsEnumVid};
     use ebml::{EsI16, EsI32, EsI64, EsI8, EsInt};
     use ebml::{EsLabel, EsOpaque, EsStr, EsU16, EsU32, EsU64, EsU8, EsUint};
diff --git a/src/libextra/fileinput.rs b/src/libextra/fileinput.rs
index d9a932f..a902459 100644
--- a/src/libextra/fileinput.rs
+++ b/src/libextra/fileinput.rs
@@ -94,6 +94,8 @@
     }
 */
 
+use core::prelude::*;
+
 use core::io::ReaderUtil;
 
 /**
diff --git a/src/libextra/flate.rs b/src/libextra/flate.rs
index b0d219b..c968bb5 100644
--- a/src/libextra/flate.rs
+++ b/src/libextra/flate.rs
@@ -14,9 +14,9 @@
 
 */
 
-use libc;
 use core::libc::{c_void, size_t, c_int};
-use vec;
+use core::libc;
+use core::vec;
 
 #[cfg(test)] use core::rand;
 #[cfg(test)] use core::rand::RngUtil;
diff --git a/src/libextra/flatpipes.rs b/src/libextra/flatpipes.rs
index a634f88..7c97cabd 100644
--- a/src/libextra/flatpipes.rs
+++ b/src/libextra/flatpipes.rs
@@ -47,6 +47,8 @@
 
 */
 
+use core::prelude::*;
+
 // The basic send/recv interface FlatChan and PortChan will implement
 use core::io;
 use core::comm::GenericChan;
@@ -168,6 +170,8 @@
 
 */
 pub mod pod {
+    use core::prelude::*;
+
     use flatpipes::flatteners::{PodUnflattener, PodFlattener};
     use flatpipes::bytepipes::{ReaderBytePort, WriterByteChan};
     use flatpipes::bytepipes::{PipeBytePort, PipeByteChan};
@@ -331,6 +335,8 @@
 
 
 pub mod flatteners {
+    use core::prelude::*;
+
     use ebml;
     use flatpipes::{Flattener, Unflattener};
     use io_util::BufReader;
@@ -501,6 +507,8 @@
 }
 
 pub mod bytepipes {
+    use core::prelude::*;
+
     use flatpipes::{ByteChan, BytePort};
 
     use core::io::{Writer, Reader, ReaderUtil};
@@ -628,6 +636,8 @@
 
 #[cfg(test)]
 mod test {
+    use core::prelude::*;
+
     use flatpipes::{Flattener, Unflattener};
     use flatpipes::bytepipes::*;
     use flatpipes::pod;
diff --git a/src/libextra/fun_treemap.rs b/src/libextra/fun_treemap.rs
index 6b051fa..fb9bb07 100644
--- a/src/libextra/fun_treemap.rs
+++ b/src/libextra/fun_treemap.rs
@@ -19,6 +19,8 @@
  * of features.
  */
 
+use core::prelude::*;
+
 use core::cmp::{Eq, Ord};
 use core::option::{Some, None};
 
diff --git a/src/libextra/future.rs b/src/libextra/future.rs
index 02828b8..f54286b 100644
--- a/src/libextra/future.rs
+++ b/src/libextra/future.rs
@@ -23,6 +23,8 @@
  * ~~~
  */
 
+use core::prelude::*;
+
 use core::cast;
 use core::cell::Cell;
 use core::comm::{PortOne, oneshot, send_one, recv_one};
diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs
index 6a9a60b..f4779c2 100644
--- a/src/libextra/getopts.rs
+++ b/src/libextra/getopts.rs
@@ -78,6 +78,8 @@
  * ```
  */
 
+use core::prelude::*;
+
 use core::cmp::Eq;
 use core::result::{Err, Ok};
 use core::result;
diff --git a/src/libextra/json.rs b/src/libextra/json.rs
index 44e965b..f56da36 100644
--- a/src/libextra/json.rs
+++ b/src/libextra/json.rs
@@ -14,6 +14,8 @@
 
 //! json serialization
 
+use core::prelude::*;
+
 use core::io::{WriterUtil, ReaderUtil};
 use core::hashmap::HashMap;
 
diff --git a/src/libextra/list.rs b/src/libextra/list.rs
index 3a91623..919a442 100644
--- a/src/libextra/list.rs
+++ b/src/libextra/list.rs
@@ -10,6 +10,8 @@
 
 //! A standard linked list
 
+use core::prelude::*;
+
 #[deriving(Eq)]
 pub enum List<T> {
     Cons(T, @List<T>),
diff --git a/src/libextra/md4.rs b/src/libextra/md4.rs
index da81f73..f99de89 100644
--- a/src/libextra/md4.rs
+++ b/src/libextra/md4.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::str;
 use core::uint;
 use core::vec;
diff --git a/src/libextra/net_ip.rs b/src/libextra/net_ip.rs
index 4f67f1c..e98c1f2 100644
--- a/src/libextra/net_ip.rs
+++ b/src/libextra/net_ip.rs
@@ -10,6 +10,8 @@
 
 //! Types/fns concerning Internet Protocol (IP), versions 4 & 6
 
+use core::prelude::*;
+
 use core::libc;
 use core::comm::{stream, SharedChan};
 use core::ptr;
@@ -145,6 +147,8 @@
 }
 
 pub mod v4 {
+    use core::prelude::*;
+
     use net::ip::{IpAddr, Ipv4, ParseAddrErr};
     use uv::ll;
     use uv_ip4_addr = uv::ll::ip4_addr;
@@ -246,6 +250,8 @@
     }
 }
 pub mod v6 {
+    use core::prelude::*;
+
     use net::ip::{IpAddr, Ipv6, ParseAddrErr};
     use uv_ip6_addr = uv::ll::ip6_addr;
     use uv_ip6_name = uv::ll::ip6_name;
diff --git a/src/libextra/net_tcp.rs b/src/libextra/net_tcp.rs
index db61679..d0a1385 100644
--- a/src/libextra/net_tcp.rs
+++ b/src/libextra/net_tcp.rs
@@ -11,6 +11,8 @@
 //! High-level interface to libuv's TCP functionality
 // FIXME #4425: Need FFI fixes
 
+use core::prelude::*;
+
 use future;
 use future_spawn = future::spawn;
 use ip = net_ip;
diff --git a/src/libextra/net_url.rs b/src/libextra/net_url.rs
index fb57c71..f6d4d75 100644
--- a/src/libextra/net_url.rs
+++ b/src/libextra/net_url.rs
@@ -10,6 +10,8 @@
 
 //! Types/fns concerning URLs (see RFC 3986)
 
+use core::prelude::*;
+
 use core::cmp::Eq;
 use core::io::{Reader, ReaderUtil};
 use core::io;
diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs
index 21685b0..fa76214 100644
--- a/src/libextra/num/bigint.rs
+++ b/src/libextra/num/bigint.rs
@@ -16,6 +16,8 @@
 A BigInt is a combination of BigUint and Sign.
 */
 
+use core::prelude::*;
+
 use core::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
 use core::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix, Orderable};
 
diff --git a/src/libextra/num/complex.rs b/src/libextra/num/complex.rs
index 41d2b4a..09bd662 100644
--- a/src/libextra/num/complex.rs
+++ b/src/libextra/num/complex.rs
@@ -11,6 +11,8 @@
 
 //! Complex numbers.
 
+use core::prelude::*;
+
 use core::num::{Zero,One,ToStrRadix};
 
 // FIXME #1284: handle complex NaN & infinity etc. This
diff --git a/src/libextra/num/rational.rs b/src/libextra/num/rational.rs
index d57c642..d26ef06 100644
--- a/src/libextra/num/rational.rs
+++ b/src/libextra/num/rational.rs
@@ -11,6 +11,8 @@
 
 //! Rational numbers
 
+use core::prelude::*;
+
 use core::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
 use core::from_str::FromStr;
 use super::bigint::BigInt;
diff --git a/src/libextra/par.rs b/src/libextra/par.rs
index e766d2d..52e7d51 100644
--- a/src/libextra/par.rs
+++ b/src/libextra/par.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use future_spawn = future::spawn;
 
 /**
diff --git a/src/libextra/priority_queue.rs b/src/libextra/priority_queue.rs
index f1e0027..6d41cd6 100644
--- a/src/libextra/priority_queue.rs
+++ b/src/libextra/priority_queue.rs
@@ -10,6 +10,8 @@
 
 //! A priority queue implemented with a binary heap
 
+use core::prelude::*;
+
 use core::old_iter::BaseIter;
 use core::unstable::intrinsics::{move_val_init, init};
 use core::unstable::intrinsics::uninit;
diff --git a/src/libextra/rc.rs b/src/libextra/rc.rs
index 02f824b..a1a14c3 100644
--- a/src/libextra/rc.rs
+++ b/src/libextra/rc.rs
@@ -19,6 +19,8 @@
 
 */
 
+use core::prelude::*;
+
 use core::libc::{c_void, size_t, malloc, free};
 use core::unstable::intrinsics;
 use core::util;
diff --git a/src/libextra/rl.rs b/src/libextra/rl.rs
index d15a8fc..4157442 100644
--- a/src/libextra/rl.rs
+++ b/src/libextra/rl.rs
@@ -11,6 +11,8 @@
 // FIXME #3921. This is unsafe because linenoise uses global mutable
 // state without mutexes.
 
+use core::prelude::*;
+
 use core::libc::{c_char, c_int};
 
 pub mod rustrt {
diff --git a/src/libextra/rope.rs b/src/libextra/rope.rs
index 0444478..4efe131 100644
--- a/src/libextra/rope.rs
+++ b/src/libextra/rope.rs
@@ -33,6 +33,8 @@
  * * access to a character by index is logarithmic (linear in strings);
  */
 
+use core::prelude::*;
+
 /// The type of ropes.
 pub type Rope = node::Root;
 
@@ -439,8 +441,9 @@
 
 pub mod iterator {
     pub mod leaf {
-        use rope::{Rope, node};
+        use core::prelude::*;
 
+        use rope::{Rope, node};
 
         pub fn start(rope: Rope) -> node::leaf_iterator::T {
             match (rope) {
@@ -453,8 +456,9 @@
         }
     }
     pub mod char {
-        use rope::{Rope, node};
+        use core::prelude::*;
 
+        use rope::{Rope, node};
 
         pub fn start(rope: Rope) -> node::char_iterator::T {
             match (rope) {
@@ -548,6 +552,8 @@
  Section: Implementation
 */
 pub mod node {
+    use core::prelude::*;
+
     use rope::node;
 
     /// Implementation of type `rope`
@@ -1127,6 +1133,8 @@
     }
 
     pub mod leaf_iterator {
+        use core::prelude::*;
+
         use rope::node::{Concat, Leaf, Node, height};
 
         pub struct T {
@@ -1166,6 +1174,8 @@
     }
 
     pub mod char_iterator {
+        use core::prelude::*;
+
         use rope::node::{Leaf, Node};
         use rope::node::leaf_iterator;
 
diff --git a/src/libextra/semver.rs b/src/libextra/semver.rs
index 09855c9..0b07886 100644
--- a/src/libextra/semver.rs
+++ b/src/libextra/semver.rs
@@ -10,6 +10,8 @@
 
 //! Semver parsing and logic
 
+use core::prelude::*;
+
 use core::char;
 use core::cmp;
 use core::io::{ReaderUtil};
diff --git a/src/libextra/serialize.rs b/src/libextra/serialize.rs
index c270f46..749e9d5 100644
--- a/src/libextra/serialize.rs
+++ b/src/libextra/serialize.rs
@@ -16,6 +16,8 @@
 
 #[forbid(non_camel_case_types)];
 
+use core::prelude::*;
+
 use core::hashmap::{HashMap, HashSet};
 use core::trie::{TrieMap, TrieSet};
 use deque::Deque;
diff --git a/src/libextra/sha1.rs b/src/libextra/sha1.rs
index d7051d7..8910442 100644
--- a/src/libextra/sha1.rs
+++ b/src/libextra/sha1.rs
@@ -22,6 +22,8 @@
  * the `reset` method.
  */
 
+use core::prelude::*;
+
 use core::str;
 use core::uint;
 use core::vec;
diff --git a/src/libextra/smallintmap.rs b/src/libextra/smallintmap.rs
index aa8372b..3e5e628 100644
--- a/src/libextra/smallintmap.rs
+++ b/src/libextra/smallintmap.rs
@@ -13,6 +13,8 @@
  * are O(highest integer key).
  */
 
+use core::prelude::*;
+
 use core::container::{Container, Mutable, Map, Set};
 use core::old_iter::BaseIter;
 use core::old_iter;
diff --git a/src/libextra/sort.rs b/src/libextra/sort.rs
index d896fa8..2c4020e 100644
--- a/src/libextra/sort.rs
+++ b/src/libextra/sort.rs
@@ -10,6 +10,8 @@
 
 //! Sorting methods
 
+use core::prelude::*;
+
 use core::cmp::{Eq, Ord};
 use core::vec::len;
 use core::vec;
diff --git a/src/libextra/stats.rs b/src/libextra/stats.rs
index 25323b4..504930a 100644
--- a/src/libextra/stats.rs
+++ b/src/libextra/stats.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::vec;
 use core::f64;
 use core::cmp;
diff --git a/src/libextra/std.rc b/src/libextra/std.rc
index 72f06f0..90672d2 100644
--- a/src/libextra/std.rc
+++ b/src/libextra/std.rc
@@ -17,7 +17,7 @@
 
 */
 
-#[link(name = "std",
+#[link(name = "extra",
        vers = "0.7-pre",
        uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
        url = "https://github.com/mozilla/rust/tree/master/src/libstd")];
@@ -28,6 +28,14 @@
 
 #[deny(non_camel_case_types)];
 
+#[no_core];
+#[no_std];
+
+extern mod core(name = "std", vers = "0.7-pre");
+
+use core::{str, unstable};
+use core::str::{StrSlice, OwnedStr};
+
 pub mod uv_ll;
 
 // General io and system-services modules
diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs
index 002c6b2..dc7f891 100644
--- a/src/libextra/sync.rs
+++ b/src/libextra/sync.rs
@@ -15,6 +15,8 @@
  * in std.
  */
 
+use core::prelude::*;
+
 use core::unstable::sync::{Exclusive, exclusive};
 use core::ptr;
 use core::task;
diff --git a/src/libextra/task_pool.rs b/src/libextra/task_pool.rs
index 0c52e1f..926045a 100644
--- a/src/libextra/task_pool.rs
+++ b/src/libextra/task_pool.rs
@@ -11,6 +11,8 @@
 /// A task pool abstraction. Useful for achieving predictable CPU
 /// parallelism.
 
+use core::prelude::*;
+
 use core::comm::Chan;
 use core::task::SchedMode;
 use core::task;
diff --git a/src/libextra/tempfile.rs b/src/libextra/tempfile.rs
index e02a7a3..d7ee326 100644
--- a/src/libextra/tempfile.rs
+++ b/src/libextra/tempfile.rs
@@ -10,6 +10,8 @@
 
 //! Temporary files and directories
 
+use core::prelude::*;
+
 use core::rand::RngUtil;
 
 pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option<Path> {
diff --git a/src/libextra/term.rs b/src/libextra/term.rs
index fcac706..7dace57 100644
--- a/src/libextra/term.rs
+++ b/src/libextra/term.rs
@@ -10,6 +10,8 @@
 
 //! Simple ANSI color library
 
+use core::prelude::*;
+
 use core::io;
 use core::option;
 use core::os;
diff --git a/src/libextra/test.rs b/src/libextra/test.rs
index 4046ce8..3245ad5 100644
--- a/src/libextra/test.rs
+++ b/src/libextra/test.rs
@@ -15,6 +15,8 @@
 // simplest interface possible for representing and running tests
 // while providing a base that other test frameworks may build off of.
 
+use core::prelude::*;
+
 use getopts;
 use sort;
 use term;
@@ -597,6 +599,8 @@
 }
 
 pub mod bench {
+    use core::prelude::*;
+
     use time::precise_time_ns;
     use test::{BenchHarness, BenchSamples};
     use stats::Stats;
diff --git a/src/libextra/time.rs b/src/libextra/time.rs
index 565ce2d..624d7d4 100644
--- a/src/libextra/time.rs
+++ b/src/libextra/time.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 static NSEC_PER_SEC: i32 = 1_000_000_000_i32;
 
 pub mod rustrt {
diff --git a/src/libextra/timer.rs b/src/libextra/timer.rs
index 092c718..6a36d67 100644
--- a/src/libextra/timer.rs
+++ b/src/libextra/timer.rs
@@ -10,6 +10,8 @@
 
 //! Utilities that leverage libuv's `uv_timer_*` API
 
+use core::prelude::*;
+
 use uv;
 use uv::iotask;
 use uv::iotask::IoTask;
diff --git a/src/libextra/treemap.rs b/src/libextra/treemap.rs
index 93f8d06..f425707 100644
--- a/src/libextra/treemap.rs
+++ b/src/libextra/treemap.rs
@@ -12,6 +12,8 @@
 //! trees. The only requirement for the types is that the key implements
 //! `TotalOrd`.
 
+use core::prelude::*;
+
 use core::iterator::*;
 use core::util::{swap, replace};
 
diff --git a/src/libextra/uv_global_loop.rs b/src/libextra/uv_global_loop.rs
index d1471ba..e067f22 100644
--- a/src/libextra/uv_global_loop.rs
+++ b/src/libextra/uv_global_loop.rs
@@ -10,6 +10,8 @@
 
 //! A process-wide libuv event loop for library use.
 
+use core::prelude::*;
+
 use iotask = uv_iotask;
 use uv_iotask::{IoTask, spawn_iotask};
 
diff --git a/src/libextra/uv_iotask.rs b/src/libextra/uv_iotask.rs
index 371eb33..ff726c1 100644
--- a/src/libextra/uv_iotask.rs
+++ b/src/libextra/uv_iotask.rs
@@ -15,6 +15,8 @@
  * `interact` function you can execute code in a uv callback.
  */
 
+use core::prelude::*;
+
 use ll = uv_ll;
 
 use core::comm::{stream, Port, Chan, SharedChan};
diff --git a/src/libextra/uv_ll.rs b/src/libextra/uv_ll.rs
index bc7703ec..014dea2 100644
--- a/src/libextra/uv_ll.rs
+++ b/src/libextra/uv_ll.rs
@@ -32,6 +32,8 @@
 
 #[allow(non_camel_case_types)]; // C types
 
+use core::prelude::*;
+
 use core::libc::size_t;
 use core::libc::c_void;
 use core::ptr::to_unsafe_ptr;
diff --git a/src/libextra/workcache.rs b/src/libextra/workcache.rs
index ee57bf2..3c10b3d 100644
--- a/src/libextra/workcache.rs
+++ b/src/libextra/workcache.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use json;
 use sha1;
 use serialize::{Encoder, Encodable, Decoder, Decodable};
diff --git a/src/libfuzzer/ast_match.rs b/src/libfuzzer/ast_match.rs
index 2502830..d0bbcc0 100644
--- a/src/libfuzzer/ast_match.rs
+++ b/src/libfuzzer/ast_match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use std;
 use vec;
 
diff --git a/src/libfuzzer/cycles.rs b/src/libfuzzer/cycles.rs
index a6434d6..5f7152f 100644
--- a/src/libfuzzer/cycles.rs
+++ b/src/libfuzzer/cycles.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use std;
 use std::rand;
 use uint::range;
diff --git a/src/libfuzzer/fuzzer.rc b/src/libfuzzer/fuzzer.rc
index 468f50a..aac6796 100644
--- a/src/libfuzzer/fuzzer.rc
+++ b/src/libfuzzer/fuzzer.rc
@@ -20,9 +20,14 @@
 
 #[allow(non_camel_case_types)];
 
-extern mod std;
-extern mod syntax;
+#[no_std];
 
+extern mod core(name = "std", vers = "0.7-pre");
+extern mod std(name = "extra", vers = "0.7-pre");
+
+extern mod syntax(vers = "0.7-pre");
+
+use core::prelude::*;
 use core::run;
 
 use syntax::diagnostic;
diff --git a/src/libfuzzer/ivec_fuzz.rs b/src/libfuzzer/ivec_fuzz.rs
index 25dc14c..d0f83d4 100644
--- a/src/libfuzzer/ivec_fuzz.rs
+++ b/src/libfuzzer/ivec_fuzz.rs
@@ -28,7 +28,8 @@
 
 */
 
-extern mod std;
+use core::prelude::*;
+
 use vec::slice;
 use vec::len;
 
diff --git a/src/libfuzzer/rand_util.rs b/src/libfuzzer/rand_util.rs
index c239e8a..32197ba 100644
--- a/src/libfuzzer/rand_util.rs
+++ b/src/libfuzzer/rand_util.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern mod std;
+use core::prelude::*;
 use std::rand;
 
 // random uint less than n
diff --git a/src/librust/rust.rc b/src/librust/rust.rc
index 7b3585a..f1d92f1 100644
--- a/src/librust/rust.rc
+++ b/src/librust/rust.rc
@@ -20,11 +20,17 @@
 #[license = "MIT/ASL2"];
 #[crate_type = "lib"];
 
+#[no_std];
+
+extern mod core(name = "std");
+
 extern mod rustpkg;
 extern mod rustdoc;
 extern mod rusti;
 extern mod rustc;
 
+use core::prelude::*;
+
 use core::run;
 
 enum ValidUsage {
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
index f999c20..42ce18c 100644
--- a/src/librustc/back/link.rs
+++ b/src/librustc/back/link.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::rpath;
 use driver::session::Session;
 use driver::session;
@@ -90,6 +92,8 @@
 }
 
 pub mod jit {
+    use core::prelude::*;
+
     use back::link::llvm_err;
     use driver::session::Session;
     use lib::llvm::llvm;
@@ -166,6 +170,8 @@
 }
 
 pub mod write {
+    use core::prelude::*;
+
     use back::link::jit;
     use back::link::{WriteOutputFile, output_type};
     use back::link::{output_type_assembly, output_type_bitcode};
diff --git a/src/librustc/back/rpath.rs b/src/librustc/back/rpath.rs
index 0dd37f0..f3e01a0 100644
--- a/src/librustc/back/rpath.rs
+++ b/src/librustc/back/rpath.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session;
 use metadata::cstore;
 use metadata::filesearch;
diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs
index 837d3c2..a3f47d3 100644
--- a/src/librustc/driver/driver.rs
+++ b/src/librustc/driver/driver.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::link;
 use back::{arm, x86, x86_64, mips};
 use driver::session::{Aggressive};
diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs
index a340422..788be3a 100644
--- a/src/librustc/driver/session.rs
+++ b/src/librustc/driver/session.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::link;
 use back::target_strs;
 use back;
diff --git a/src/librustc/front/config.rs b/src/librustc/front/config.rs
index 6341b1c..be2f5cf 100644
--- a/src/librustc/front/config.rs
+++ b/src/librustc/front/config.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use syntax::{ast, fold, attr};
 
 type in_cfg_pred = @fn(attrs: ~[ast::attribute]) -> bool;
diff --git a/src/librustc/front/intrinsic_inject.rs b/src/librustc/front/intrinsic_inject.rs
index fd26971..7a8a2a7 100644
--- a/src/librustc/front/intrinsic_inject.rs
+++ b/src/librustc/front/intrinsic_inject.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session::Session;
 use syntax::parse;
 use syntax::ast;
diff --git a/src/librustc/front/std_inject.rs b/src/librustc/front/std_inject.rs
index e84f552..616b1cb 100644
--- a/src/librustc/front/std_inject.rs
+++ b/src/librustc/front/std_inject.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session::Session;
 
 use syntax::ast;
diff --git a/src/librustc/front/test.rs b/src/librustc/front/test.rs
index a0ff8cb..2bc6488 100644
--- a/src/librustc/front/test.rs
+++ b/src/librustc/front/test.rs
@@ -10,6 +10,8 @@
 
 // Code that generates a test runner to run all the tests in a crate
 
+use core::prelude::*;
+
 use driver::session;
 use front::config;
 
diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs
index 160f375..ac675df 100644
--- a/src/librustc/lib/llvm.rs
+++ b/src/librustc/lib/llvm.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::hashmap::HashMap;
 use core::libc::{c_uint, c_ushort};
 
diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs
index d402578..55689d8 100644
--- a/src/librustc/metadata/creader.rs
+++ b/src/librustc/metadata/creader.rs
@@ -8,9 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 //! Validates all used crates and extern libraries and loads their metadata
 
+use core::prelude::*;
+
 use metadata::cstore;
 use metadata::decoder;
 use metadata::filesearch::FileSearch;
diff --git a/src/librustc/metadata/csearch.rs b/src/librustc/metadata/csearch.rs
index b21417f..c887b25 100644
--- a/src/librustc/metadata/csearch.rs
+++ b/src/librustc/metadata/csearch.rs
@@ -10,6 +10,8 @@
 
 // Searching for information from the cstore
 
+use core::prelude::*;
+
 use metadata::common::*;
 use metadata::cstore;
 use metadata::decoder;
diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs
index 21815a9..0c0f094 100644
--- a/src/librustc/metadata/cstore.rs
+++ b/src/librustc/metadata/cstore.rs
@@ -12,6 +12,8 @@
 // The crate store - a central repo for information collected about external
 // crates and libraries
 
+use core::prelude::*;
+
 use metadata::cstore;
 use metadata::decoder;
 
diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs
index d6e7e64..ef9c945 100644
--- a/src/librustc/metadata/decoder.rs
+++ b/src/librustc/metadata/decoder.rs
@@ -10,6 +10,8 @@
 
 // Decoding metadata from a single crate's metadata
 
+use core::prelude::*;
+
 use metadata::cstore::crate_metadata;
 use metadata::common::*;
 use metadata::csearch::{ProvidedTraitMethodInfo, StaticMethodInfo};
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs
index 297b040..e959983 100644
--- a/src/librustc/metadata/encoder.rs
+++ b/src/librustc/metadata/encoder.rs
@@ -10,6 +10,8 @@
 
 // Metadata encoding
 
+use core::prelude::*;
+
 use metadata::common::*;
 use metadata::cstore;
 use metadata::decoder;
diff --git a/src/librustc/metadata/filesearch.rs b/src/librustc/metadata/filesearch.rs
index 7a7ee03..0d9b16d 100644
--- a/src/librustc/metadata/filesearch.rs
+++ b/src/librustc/metadata/filesearch.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 // A module for searching for libraries
 // FIXME (#2658): I'm not happy how this module turned out. Should
 // probably just be folded into cstore.
diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs
index 75639e8..c29a644 100644
--- a/src/librustc/metadata/loader.rs
+++ b/src/librustc/metadata/loader.rs
@@ -8,9 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 //! Finds crate binaries and loads their metadata
 
+use core::prelude::*;
+
 use lib::llvm::{False, llvm, mk_object_file, mk_section_iter};
 use metadata::decoder;
 use metadata::encoder;
diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs
index ad5bd24..a726ca4 100644
--- a/src/librustc/metadata/tydecode.rs
+++ b/src/librustc/metadata/tydecode.rs
@@ -14,6 +14,8 @@
 // tjc note: Would be great to have a `match check` macro equivalent
 // for some of these
 
+use core::prelude::*;
+
 use middle::ty;
 
 use syntax::abi::AbiSet;
diff --git a/src/librustc/metadata/tyencode.rs b/src/librustc/metadata/tyencode.rs
index b1be0fb..bc9edcf 100644
--- a/src/librustc/metadata/tyencode.rs
+++ b/src/librustc/metadata/tyencode.rs
@@ -10,6 +10,8 @@
 
 // Type encoding
 
+use core::prelude::*;
+
 use middle::ty::param_ty;
 use middle::ty;
 
diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs
index 5188f46..3bade41 100644
--- a/src/librustc/middle/astencode.rs
+++ b/src/librustc/middle/astencode.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use c = metadata::common;
 use cstore = metadata::cstore;
 use driver::session::Session;
diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs
index ce9027e..237a464 100644
--- a/src/librustc/middle/borrowck/check_loans.rs
+++ b/src/librustc/middle/borrowck/check_loans.rs
@@ -17,6 +17,8 @@
 // 3. assignments do not affect things loaned out as immutable
 // 4. moves do not affect things loaned out in any way
 
+use core::prelude::*;
+
 use middle::moves;
 use middle::borrowck::*;
 use mc = middle::mem_categorization;
diff --git a/src/librustc/middle/check_const.rs b/src/librustc/middle/check_const.rs
index faa489e..345b128 100644
--- a/src/librustc/middle/check_const.rs
+++ b/src/librustc/middle/check_const.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session::Session;
 use middle::resolve;
 use middle::ty;
diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs
index 3717c61..db5bdf8 100644
--- a/src/librustc/middle/check_match.rs
+++ b/src/librustc/middle/check_match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::const_eval::{compare_const_vals, lookup_const_by_id};
 use middle::const_eval::{eval_const_expr, const_val, const_bool};
 use middle::pat_util::*;
diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs
index 751767f..49d31d2 100644
--- a/src/librustc/middle/const_eval.rs
+++ b/src/librustc/middle/const_eval.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use metadata::csearch;
 use middle::astencode;
 use middle::ty;
diff --git a/src/librustc/middle/dataflow.rs b/src/librustc/middle/dataflow.rs
index 9c9f72a..5898b6a 100644
--- a/src/librustc/middle/dataflow.rs
+++ b/src/librustc/middle/dataflow.rs
@@ -16,6 +16,8 @@
  * GEN and KILL bits for each expression.
  */
 
+use core::prelude::*;
+
 use core::cast;
 use core::uint;
 use syntax::ast;
diff --git a/src/librustc/middle/entry.rs b/src/librustc/middle/entry.rs
index e478f29..b35ec25 100644
--- a/src/librustc/middle/entry.rs
+++ b/src/librustc/middle/entry.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session;
 use driver::session::Session;
 use syntax::parse::token::special_idents;
diff --git a/src/librustc/middle/freevars.rs b/src/librustc/middle/freevars.rs
index 872ad83..9dffd09 100644
--- a/src/librustc/middle/freevars.rs
+++ b/src/librustc/middle/freevars.rs
@@ -11,6 +11,8 @@
 // A pass that annotates for each loops and functions with the free
 // variables that they contain.
 
+use core::prelude::*;
+
 use middle::resolve;
 use middle::ty;
 
diff --git a/src/librustc/middle/kind.rs b/src/librustc/middle/kind.rs
index bade18e..a03191e 100644
--- a/src/librustc/middle/kind.rs
+++ b/src/librustc/middle/kind.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::freevars::freevar_entry;
 use middle::freevars;
 use middle::pat_util;
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs
index 24ee587..3a0f6f5 100644
--- a/src/librustc/middle/lang_items.rs
+++ b/src/librustc/middle/lang_items.rs
@@ -19,6 +19,8 @@
 //
 // * Functions called by the compiler itself.
 
+use core::prelude::*;
+
 use driver::session::Session;
 use metadata::csearch::each_lang_item;
 use metadata::cstore::iter_crate_data;
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index b141976..11d1f5b 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
+use driver::session::Session;
 use driver::session;
 use middle::ty;
 use middle::pat_util;
diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs
index 4608f77..e4b9346 100644
--- a/src/librustc/middle/liveness.rs
+++ b/src/librustc/middle/liveness.rs
@@ -102,6 +102,7 @@
  *   to return explicitly.
  */
 
+use core::prelude::*;
 
 use middle::lint::{unused_variable, dead_assignment};
 use middle::pat_util;
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index c9ec10e..52c7bf0 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -46,6 +46,8 @@
  * then an index to jump forward to the relevant item.
  */
 
+use core::prelude::*;
+
 use middle::ty;
 use middle::typeck;
 use util::ppaux::{ty_to_str, region_to_str, Repr};
diff --git a/src/librustc/middle/moves.rs b/src/librustc/middle/moves.rs
index e81a9d6..3b20344 100644
--- a/src/librustc/middle/moves.rs
+++ b/src/librustc/middle/moves.rs
@@ -206,6 +206,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::pat_util::{pat_bindings};
 use middle::freevars;
 use middle::ty;
diff --git a/src/librustc/middle/pat_util.rs b/src/librustc/middle/pat_util.rs
index b87adb7..1fd6012 100644
--- a/src/librustc/middle/pat_util.rs
+++ b/src/librustc/middle/pat_util.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::resolve;
 
 use core::hashmap::HashMap;
diff --git a/src/librustc/middle/privacy.rs b/src/librustc/middle/privacy.rs
index 6ce074b..5f88c25 100644
--- a/src/librustc/middle/privacy.rs
+++ b/src/librustc/middle/privacy.rs
@@ -11,6 +11,8 @@
 // A pass that checks to make sure private fields and methods aren't used
 // outside their scopes.
 
+use core::prelude::*;
+
 use metadata::csearch;
 use middle::ty::{ty_struct, ty_enum};
 use middle::ty;
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs
index cbe9e90..1731ced 100644
--- a/src/librustc/middle/region.rs
+++ b/src/librustc/middle/region.rs
@@ -17,6 +17,8 @@
 
 */
 
+use core::prelude::*;
+
 use driver::session::Session;
 use metadata::csearch;
 use middle::resolve;
diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs
index 3066716..b2ef0c4 100644
--- a/src/librustc/middle/resolve.rs
+++ b/src/librustc/middle/resolve.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session::Session;
 use metadata::csearch::{each_path, get_trait_method_def_ids};
 use metadata::csearch::get_method_name_and_explicit_self;
diff --git a/src/librustc/middle/subst.rs b/src/librustc/middle/subst.rs
index 5c7c33d..fba174c 100644
--- a/src/librustc/middle/subst.rs
+++ b/src/librustc/middle/subst.rs
@@ -10,6 +10,8 @@
 
 // Type substitutions.
 
+use core::prelude::*;
+
 use middle::ty;
 use util::ppaux::Repr;
 
diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs
index c7f2da9..9365a69 100644
--- a/src/librustc/middle/trans/_match.rs
+++ b/src/librustc/middle/trans/_match.rs
@@ -142,6 +142,8 @@
  *
  */
 
+use core::prelude::*;
+
 use back::abi;
 use lib::llvm::{llvm, ValueRef, BasicBlockRef};
 use middle::const_eval;
diff --git a/src/librustc/middle/trans/asm.rs b/src/librustc/middle/trans/asm.rs
index 9211939..e2baabc 100644
--- a/src/librustc/middle/trans/asm.rs
+++ b/src/librustc/middle/trans/asm.rs
@@ -12,6 +12,8 @@
 # Translation of inline assembly.
 */
 
+use core::prelude::*;
+
 use lib;
 use middle::trans::build::*;
 use middle::trans::callee;
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index 17d3e2c..605bd72 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -23,6 +23,8 @@
 //     but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
 //     int) and rec(x=int, y=int, z=int) will have the same TypeRef.
 
+use core::prelude::*;
+
 use back::link::{mangle_exported_name};
 use back::{link, abi, upcall};
 use driver::session;
diff --git a/src/librustc/middle/trans/build.rs b/src/librustc/middle/trans/build.rs
index 965516d..0411aad 100644
--- a/src/librustc/middle/trans/build.rs
+++ b/src/librustc/middle/trans/build.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use lib::llvm::llvm;
 use lib::llvm::{CallConv, AtomicBinOp, AtomicOrdering, AsmDialect};
 use lib::llvm::{Opcode, IntPredicate, RealPredicate, False};
diff --git a/src/librustc/middle/trans/cabi_mips.rs b/src/librustc/middle/trans/cabi_mips.rs
index a1f54c2..2282952 100644
--- a/src/librustc/middle/trans/cabi_mips.rs
+++ b/src/librustc/middle/trans/cabi_mips.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::libc::c_uint;
 use lib::llvm::{llvm, TypeRef, Integer, Pointer, Float, Double};
 use lib::llvm::{Struct, Array, Attribute};
diff --git a/src/librustc/middle/trans/cabi_x86.rs b/src/librustc/middle/trans/cabi_x86.rs
index 3a45b28..fbb6053 100644
--- a/src/librustc/middle/trans/cabi_x86.rs
+++ b/src/librustc/middle/trans/cabi_x86.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use driver::session::{os_win32, os_macos};
 use lib::llvm::*;
 use lib::llvm::llvm::*;
diff --git a/src/librustc/middle/trans/callee.rs b/src/librustc/middle/trans/callee.rs
index 6fbefb1..3d4649b 100644
--- a/src/librustc/middle/trans/callee.rs
+++ b/src/librustc/middle/trans/callee.rs
@@ -16,6 +16,8 @@
 // and methods are represented as just a fn ptr and not a full
 // closure.
 
+use core::prelude::*;
+
 use back::abi;
 use driver::session;
 use lib;
diff --git a/src/librustc/middle/trans/closure.rs b/src/librustc/middle/trans/closure.rs
index 3a14d72..57df27e 100644
--- a/src/librustc/middle/trans/closure.rs
+++ b/src/librustc/middle/trans/closure.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::abi;
 use back::link::{mangle_internal_name_by_path_and_seq};
 use lib::llvm::{llvm, ValueRef};
diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs
index 5da664b..fac155a 100644
--- a/src/librustc/middle/trans/common.rs
+++ b/src/librustc/middle/trans/common.rs
@@ -8,11 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+//! Code that is useful in various trans modules.
 
-/**
-   Code that is useful in various trans modules.
-
-*/
+use core::prelude::*;
 
 use back::{abi, upcall};
 use driver::session;
diff --git a/src/librustc/middle/trans/consts.rs b/src/librustc/middle/trans/consts.rs
index ac85a9f..97ccb6d 100644
--- a/src/librustc/middle/trans/consts.rs
+++ b/src/librustc/middle/trans/consts.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::abi;
 use lib::llvm::{llvm, ConstFCmp, ConstICmp, SetLinkage, PrivateLinkage, ValueRef, TypeRef, Bool,
     True, False};
diff --git a/src/librustc/middle/trans/controlflow.rs b/src/librustc/middle/trans/controlflow.rs
index a1b673b..efe23ae 100644
--- a/src/librustc/middle/trans/controlflow.rs
+++ b/src/librustc/middle/trans/controlflow.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::link;
 use lib;
 use lib::llvm::*;
diff --git a/src/librustc/middle/trans/datum.rs b/src/librustc/middle/trans/datum.rs
index 4a9a907..6be5dbe 100644
--- a/src/librustc/middle/trans/datum.rs
+++ b/src/librustc/middle/trans/datum.rs
@@ -85,6 +85,8 @@
  * methods themselves.  Most are only suitable for some types of
  * values. */
 
+use core::prelude::*;
+
 use lib;
 use lib::llvm::ValueRef;
 use middle::trans::adt;
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs
index 0582853..979559a 100644
--- a/src/librustc/middle/trans/debuginfo.rs
+++ b/src/librustc/middle/trans/debuginfo.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use driver::session;
 use lib::llvm::ValueRef;
diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs
index 9349c2b..d581d804 100644
--- a/src/librustc/middle/trans/expr.rs
+++ b/src/librustc/middle/trans/expr.rs
@@ -119,6 +119,8 @@
 
 */
 
+use core::prelude::*;
+
 use back::abi;
 use lib::llvm::{ValueRef, TypeRef, llvm};
 use lib;
diff --git a/src/librustc/middle/trans/foreign.rs b/src/librustc/middle/trans/foreign.rs
index 0ed0eb3..460d740 100644
--- a/src/librustc/middle/trans/foreign.rs
+++ b/src/librustc/middle/trans/foreign.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::{link, abi};
 use lib::llvm::{SequentiallyConsistent, Acquire, Release, Xchg};
 use lib::llvm::{TypeRef, ValueRef};
diff --git a/src/librustc/middle/trans/glue.rs b/src/librustc/middle/trans/glue.rs
index b731d0f..8dc97b5 100644
--- a/src/librustc/middle/trans/glue.rs
+++ b/src/librustc/middle/trans/glue.rs
@@ -12,6 +12,8 @@
 //
 // Code relating to taking, dropping, etc as well as type descriptors.
 
+use core::prelude::*;
+
 use back::abi;
 use back::link::*;
 use driver::session;
diff --git a/src/librustc/middle/trans/inline.rs b/src/librustc/middle/trans/inline.rs
index 8c88119..aa4bb77 100644
--- a/src/librustc/middle/trans/inline.rs
+++ b/src/librustc/middle/trans/inline.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use metadata::csearch;
 use middle::astencode;
 use middle::trans::base::{get_insn_ctxt};
diff --git a/src/librustc/middle/trans/meth.rs b/src/librustc/middle/trans/meth.rs
index 7633c90..baa0dfc 100644
--- a/src/librustc/middle/trans/meth.rs
+++ b/src/librustc/middle/trans/meth.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::abi;
 use lib::llvm::llvm;
 use lib::llvm::ValueRef;
diff --git a/src/librustc/middle/trans/monomorphize.rs b/src/librustc/middle/trans/monomorphize.rs
index f07cf58..1b3150f 100644
--- a/src/librustc/middle/trans/monomorphize.rs
+++ b/src/librustc/middle/trans/monomorphize.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use back::link::mangle_exported_name;
 use driver::session;
 use lib::llvm::ValueRef;
diff --git a/src/librustc/middle/trans/reachable.rs b/src/librustc/middle/trans/reachable.rs
index 471d821..6236077 100644
--- a/src/librustc/middle/trans/reachable.rs
+++ b/src/librustc/middle/trans/reachable.rs
@@ -15,6 +15,7 @@
 // makes all other generics or inline functions that it references
 // reachable as well.
 
+use core::prelude::*;
 
 use middle::resolve;
 use middle::ty;
diff --git a/src/librustc/middle/trans/type_of.rs b/src/librustc/middle/trans/type_of.rs
index 10c2a21..bddcb9a 100644
--- a/src/librustc/middle/trans/type_of.rs
+++ b/src/librustc/middle/trans/type_of.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use lib::llvm::llvm;
 use lib::llvm::{TypeRef};
 use middle::trans::adt;
diff --git a/src/librustc/middle/trans/write_guard.rs b/src/librustc/middle/trans/write_guard.rs
index 281e592..ffcef3a 100644
--- a/src/librustc/middle/trans/write_guard.rs
+++ b/src/librustc/middle/trans/write_guard.rs
@@ -14,6 +14,8 @@
 //! and for each in debugging (e.g., so you can use
 //! `RUST_LOG=rustc::middle::trans::write_guard`).
 
+use core::prelude::*;
+
 use lib::llvm::ValueRef;
 use middle::borrowck::{RootInfo, root_map_key, DynaImm, DynaMut};
 use middle::trans::base::*;
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 2067431..734c9ac 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use driver::session;
 use metadata::csearch;
diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs
index 222493b..5cc2b0d 100644
--- a/src/librustc/middle/typeck/astconv.rs
+++ b/src/librustc/middle/typeck/astconv.rs
@@ -52,6 +52,8 @@
  * an rptr (`&r.T`) use the region `r` that appears in the rptr.
  */
 
+use core::prelude::*;
+
 use middle::const_eval;
 use middle::ty::{substs};
 use middle::ty::{ty_param_substs_and_ty};
diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs
index d6ef27a..77b1066 100644
--- a/src/librustc/middle/typeck/check/_match.rs
+++ b/src/librustc/middle/typeck/check/_match.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
 use middle::ty;
 use middle::typeck::check::demand;
diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs
index 7655212..a34465d 100644
--- a/src/librustc/middle/typeck/check/method.rs
+++ b/src/librustc/middle/typeck/check/method.rs
@@ -79,6 +79,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::resolve;
 use middle::ty::*;
 use middle::ty;
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs
index cd58dc5..226d7fa 100644
--- a/src/librustc/middle/typeck/check/mod.rs
+++ b/src/librustc/middle/typeck/check/mod.rs
@@ -76,6 +76,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::const_eval;
 use middle::pat_util::pat_id_map;
 use middle::pat_util;
diff --git a/src/librustc/middle/typeck/check/regionck.rs b/src/librustc/middle/typeck/check/regionck.rs
index 3f3df7b..642022c 100644
--- a/src/librustc/middle/typeck/check/regionck.rs
+++ b/src/librustc/middle/typeck/check/regionck.rs
@@ -27,6 +27,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::freevars::get_freevars;
 use middle::ty::{re_scope};
 use middle::ty;
@@ -778,6 +780,8 @@
      * but more special purpose.
      */
 
+    use core::prelude::*;
+
     use middle::typeck::check::regionck::{Rcx, infallibly_mk_subr};
     use middle::typeck::check::regionck::mk_subregion_due_to_derefence;
     use middle::ty;
diff --git a/src/librustc/middle/typeck/check/regionmanip.rs b/src/librustc/middle/typeck/check/regionmanip.rs
index 87b105e..89cf3df 100644
--- a/src/librustc/middle/typeck/check/regionmanip.rs
+++ b/src/librustc/middle/typeck/check/regionmanip.rs
@@ -10,6 +10,8 @@
 
 // #[warn(deprecated_mode)];
 
+use core::prelude::*;
+
 use middle::ty;
 
 use middle::typeck::isr_alist;
diff --git a/src/librustc/middle/typeck/check/vtable.rs b/src/librustc/middle/typeck/check/vtable.rs
index 2e2b455..67d7b06 100644
--- a/src/librustc/middle/typeck/check/vtable.rs
+++ b/src/librustc/middle/typeck/check/vtable.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::resolve::Impl;
 use middle::ty::param_ty;
 use middle::ty;
diff --git a/src/librustc/middle/typeck/check/writeback.rs b/src/librustc/middle/typeck/check/writeback.rs
index 394d00b..29c1eaa 100644
--- a/src/librustc/middle/typeck/check/writeback.rs
+++ b/src/librustc/middle/typeck/check/writeback.rs
@@ -12,6 +12,8 @@
 // unresolved type variables and replaces "ty_var" types with their
 // substitutions.
 
+use core::prelude::*;
+
 use middle::pat_util;
 use middle::ty;
 use middle::typeck::check::{FnCtxt, SelfInfo};
diff --git a/src/librustc/middle/typeck/coherence.rs b/src/librustc/middle/typeck/coherence.rs
index 8870f0f..14a4034 100644
--- a/src/librustc/middle/typeck/coherence.rs
+++ b/src/librustc/middle/typeck/coherence.rs
@@ -14,6 +14,7 @@
 // has at most one implementation for each type. Then we build a mapping from
 // each trait in the system to its implementations.
 
+use core::prelude::*;
 
 use driver;
 use metadata::csearch::{each_path, get_impl_trait};
diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs
index 6c7f731..b3b59c2 100644
--- a/src/librustc/middle/typeck/collect.rs
+++ b/src/librustc/middle/typeck/collect.rs
@@ -30,6 +30,8 @@
 
 */
 
+use core::prelude::*;
+
 use metadata::csearch;
 use middle::ty::{substs, ty_param_bounds_and_ty};
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/coercion.rs b/src/librustc/middle/typeck/infer/coercion.rs
index 3620b60..64f0d43 100644
--- a/src/librustc/middle/typeck/infer/coercion.rs
+++ b/src/librustc/middle/typeck/infer/coercion.rs
@@ -64,6 +64,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn};
 use middle::ty::{AutoDerefRef};
 use middle::ty::{vstore_slice, vstore_box, vstore_uniq};
diff --git a/src/librustc/middle/typeck/infer/combine.rs b/src/librustc/middle/typeck/infer/combine.rs
index b318e6f..d07752e 100644
--- a/src/librustc/middle/typeck/infer/combine.rs
+++ b/src/librustc/middle/typeck/infer/combine.rs
@@ -54,6 +54,8 @@
 // terms of error reporting, although we do not do that properly right
 // now.
 
+use core::prelude::*;
+
 use middle::ty::{FloatVar, FnSig, IntVar, TyVar};
 use middle::ty::{IntType, UintType, substs};
 use middle::ty::{BuiltinBounds};
diff --git a/src/librustc/middle/typeck/infer/glb.rs b/src/librustc/middle/typeck/infer/glb.rs
index 9ade6de..78989a1 100644
--- a/src/librustc/middle/typeck/infer/glb.rs
+++ b/src/librustc/middle/typeck/infer/glb.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::ty::{BuiltinBounds};
 use middle::ty::RegionVid;
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/lattice.rs b/src/librustc/middle/typeck/infer/lattice.rs
index 57bab29..81befc5 100644
--- a/src/librustc/middle/typeck/infer/lattice.rs
+++ b/src/librustc/middle/typeck/infer/lattice.rs
@@ -32,6 +32,8 @@
  * a lattice.
  */
 
+use core::prelude::*;
+
 use middle::ty::{RegionVid, TyVar, Vid};
 use middle::ty;
 use middle::typeck::isr_alist;
diff --git a/src/librustc/middle/typeck/infer/lub.rs b/src/librustc/middle/typeck/infer/lub.rs
index 82fd4e3..c906d3e 100644
--- a/src/librustc/middle/typeck/infer/lub.rs
+++ b/src/librustc/middle/typeck/infer/lub.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::ty::{BuiltinBounds};
 use middle::ty::RegionVid;
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs
index 2c42914..864f0e2 100644
--- a/src/librustc/middle/typeck/infer/mod.rs
+++ b/src/librustc/middle/typeck/infer/mod.rs
@@ -242,6 +242,8 @@
 
 */
 
+use core::prelude::*;
+
 pub use middle::ty::IntVarValue;
 pub use middle::typeck::infer::resolve::resolve_and_force_all_but_regions;
 pub use middle::typeck::infer::resolve::{force_all, not_regions};
diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs
index 0a38e02..14a7910 100644
--- a/src/librustc/middle/typeck/infer/region_inference.rs
+++ b/src/librustc/middle/typeck/infer/region_inference.rs
@@ -536,6 +536,8 @@
 
 */
 
+use core::prelude::*;
+
 use middle::ty;
 use middle::ty::{FreeRegion, Region, RegionVid};
 use middle::ty::{re_empty, re_static, re_infer, re_free, re_bound};
diff --git a/src/librustc/middle/typeck/infer/resolve.rs b/src/librustc/middle/typeck/infer/resolve.rs
index 2b88825..217d971 100644
--- a/src/librustc/middle/typeck/infer/resolve.rs
+++ b/src/librustc/middle/typeck/infer/resolve.rs
@@ -46,6 +46,8 @@
 // future).  If you want to resolve everything but one type, you are
 // probably better off writing `resolve_all - resolve_ivar`.
 
+use core::prelude::*;
+
 use middle::ty::{FloatVar, FloatVid, IntVar, IntVid, RegionVid, TyVar, TyVid};
 use middle::ty::{type_is_bot, IntType, UintType};
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/sub.rs b/src/librustc/middle/typeck/infer/sub.rs
index 8da3d7b..11fac4d 100644
--- a/src/librustc/middle/typeck/infer/sub.rs
+++ b/src/librustc/middle/typeck/infer/sub.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::ty::{BuiltinBounds};
 use middle::ty;
 use middle::ty::TyVar;
diff --git a/src/librustc/middle/typeck/infer/to_str.rs b/src/librustc/middle/typeck/infer/to_str.rs
index d9088c0..888339b 100644
--- a/src/librustc/middle/typeck/infer/to_str.rs
+++ b/src/librustc/middle/typeck/infer/to_str.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::ty::{FnSig, Vid};
 use middle::ty::IntVarValue;
 use middle::ty;
diff --git a/src/librustc/middle/typeck/infer/unify.rs b/src/librustc/middle/typeck/infer/unify.rs
index d6e6525..39feedf 100644
--- a/src/librustc/middle/typeck/infer/unify.rs
+++ b/src/librustc/middle/typeck/infer/unify.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use std::smallintmap::SmallIntMap;
 
 use middle::ty::{Vid, expected_found, IntVarValue};
diff --git a/src/librustc/middle/typeck/mod.rs b/src/librustc/middle/typeck/mod.rs
index 048a658..8684b1b 100644
--- a/src/librustc/middle/typeck/mod.rs
+++ b/src/librustc/middle/typeck/mod.rs
@@ -48,6 +48,8 @@
 
 */
 
+use core::prelude::*;
+
 use driver::session;
 
 use middle::resolve;
diff --git a/src/librustc/middle/typeck/rscope.rs b/src/librustc/middle/typeck/rscope.rs
index 7c37784..1f787e1 100644
--- a/src/librustc/middle/typeck/rscope.rs
+++ b/src/librustc/middle/typeck/rscope.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use middle::ty;
 
 use syntax::ast;
diff --git a/src/librustc/rustc.rc b/src/librustc/rustc.rc
index a21c5dc..f1263be 100644
--- a/src/librustc/rustc.rc
+++ b/src/librustc/rustc.rc
@@ -21,9 +21,15 @@
 #[allow(non_camel_case_types)];
 #[deny(deprecated_pattern)];
 
-extern mod std;
+#[no_core];
+#[no_std];
+
+extern mod core(name = "std");
+extern mod std(name = "extra");
 extern mod syntax;
 
+use core::prelude::*;
+
 use driver::driver::{host_triple, optgroups, early_error};
 use driver::driver::{str_input, file_input, build_session_options};
 use driver::driver::{build_session, build_configuration, parse_pretty};
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs
index b4a479f..7bd8c6a 100644
--- a/src/librustc/util/common.rs
+++ b/src/librustc/util/common.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use syntax::ast;
 use syntax::codemap::{span};
 use syntax::visit;
diff --git a/src/librustc/util/enum_set.rs b/src/librustc/util/enum_set.rs
index 49750c5..048b602 100644
--- a/src/librustc/util/enum_set.rs
+++ b/src/librustc/util/enum_set.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
+use core;
+
 #[deriving(Eq, IterBytes)]
 pub struct EnumSet<E> {
     // We must maintain the invariant that no bits are set
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 06adb6c..384298d 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use metadata::encoder;
 use middle::ty::{ReSkolemized, ReVar};
 use middle::ty::{bound_region, br_anon, br_named, br_self, br_cap_avoid};
diff --git a/src/librustdoc/astsrv.rs b/src/librustdoc/astsrv.rs
index 47c99a8..21ce70e 100644
--- a/src/librustdoc/astsrv.rs
+++ b/src/librustdoc/astsrv.rs
@@ -17,6 +17,8 @@
 non-sendableness.
 */
 
+use core::prelude::*;
+
 use parse;
 
 use core::cell::Cell;
diff --git a/src/librustdoc/attr_parser.rs b/src/librustdoc/attr_parser.rs
index ec31795..92e2973 100644
--- a/src/librustdoc/attr_parser.rs
+++ b/src/librustdoc/attr_parser.rs
@@ -15,6 +15,8 @@
 an AST's attributes.
 */
 
+use core::prelude::*;
+
 use syntax::ast;
 use syntax::attr;
 
diff --git a/src/librustdoc/attr_pass.rs b/src/librustdoc/attr_pass.rs
index 35cbe39..e49e9b2 100644
--- a/src/librustdoc/attr_pass.rs
+++ b/src/librustdoc/attr_pass.rs
@@ -16,6 +16,8 @@
 of the natural-language documentation for a crate.
 */
 
+use core::prelude::*;
+
 use astsrv;
 use attr_parser;
 use doc::ItemUtils;
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs
index 7464b70..85ceb6c 100644
--- a/src/librustdoc/config.rs
+++ b/src/librustdoc/config.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use core::cell::Cell;
 use core::run;
diff --git a/src/librustdoc/demo.rs b/src/librustdoc/demo.rs
index 7cbd922..c5fb8f2 100644
--- a/src/librustdoc/demo.rs
+++ b/src/librustdoc/demo.rs
@@ -21,6 +21,8 @@
  * tests on this file
  */
 
+use core::prelude::*;
+
 /// The base price of a muffin on a non-holiday
 static price_of_a_muffin: float = 70f;
 
diff --git a/src/librustdoc/desc_to_brief_pass.rs b/src/librustdoc/desc_to_brief_pass.rs
index c61b387..1066f9e 100644
--- a/src/librustdoc/desc_to_brief_pass.rs
+++ b/src/librustdoc/desc_to_brief_pass.rs
@@ -15,6 +15,8 @@
 is interpreted as the brief description.
 */
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/doc.rs b/src/librustdoc/doc.rs
index 1656eb0..b383a41 100644
--- a/src/librustdoc/doc.rs
+++ b/src/librustdoc/doc.rs
@@ -10,6 +10,8 @@
 
 //! The document model
 
+use core::prelude::*;
+
 use doc;
 
 pub type AstId = int;
diff --git a/src/librustdoc/extract.rs b/src/librustdoc/extract.rs
index e3da6e6..2ebdd82 100644
--- a/src/librustdoc/extract.rs
+++ b/src/librustdoc/extract.rs
@@ -10,6 +10,8 @@
 
 //! Converts the Rust AST to the rustdoc document model
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/fold.rs b/src/librustdoc/fold.rs
index 4c120aed..5bd3942 100644
--- a/src/librustdoc/fold.rs
+++ b/src/librustdoc/fold.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use doc;
 #[cfg(test)] use extract;
 #[cfg(test)] use parse;
diff --git a/src/librustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs
index c7329c4..9d55452 100644
--- a/src/librustdoc/markdown_index_pass.rs
+++ b/src/librustdoc/markdown_index_pass.rs
@@ -10,6 +10,8 @@
 
 //! Build indexes as appropriate for the markdown pass
 
+use core::prelude::*;
+
 use astsrv;
 use config;
 use doc::ItemUtils;
diff --git a/src/librustdoc/markdown_pass.rs b/src/librustdoc/markdown_pass.rs
index 4f4bb41..ff79557 100644
--- a/src/librustdoc/markdown_pass.rs
+++ b/src/librustdoc/markdown_pass.rs
@@ -10,6 +10,8 @@
 
 //! Generate markdown from a document tree
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/markdown_writer.rs b/src/librustdoc/markdown_writer.rs
index 671364f..b585b29 100644
--- a/src/librustdoc/markdown_writer.rs
+++ b/src/librustdoc/markdown_writer.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use config;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/page_pass.rs b/src/librustdoc/page_pass.rs
index 02716ff..f0d4c62 100644
--- a/src/librustdoc/page_pass.rs
+++ b/src/librustdoc/page_pass.rs
@@ -15,6 +15,8 @@
 individual modules, pages for the crate, indexes, etc.
 */
 
+use core::prelude::*;
+
 use astsrv;
 use config;
 use doc::ItemUtils;
diff --git a/src/librustdoc/parse.rs b/src/librustdoc/parse.rs
index 1f41335..455720f 100644
--- a/src/librustdoc/parse.rs
+++ b/src/librustdoc/parse.rs
@@ -10,6 +10,8 @@
 
 //! AST-parsing helpers
 
+use core::prelude::*;
+
 use rustc::driver::driver::{file_input, str_input};
 use rustc::driver::driver;
 use rustc::driver::session;
diff --git a/src/librustdoc/pass.rs b/src/librustdoc/pass.rs
index 6527481..85eb5dc 100644
--- a/src/librustdoc/pass.rs
+++ b/src/librustdoc/pass.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use astsrv;
 use doc;
 use time;
diff --git a/src/librustdoc/path_pass.rs b/src/librustdoc/path_pass.rs
index a31a8ac..a7a3615 100644
--- a/src/librustdoc/path_pass.rs
+++ b/src/librustdoc/path_pass.rs
@@ -10,6 +10,8 @@
 
 //! Records the full path to items
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/prune_private_pass.rs b/src/librustdoc/prune_private_pass.rs
index 9dfcc7c..26344eb 100644
--- a/src/librustdoc/prune_private_pass.rs
+++ b/src/librustdoc/prune_private_pass.rs
@@ -10,6 +10,8 @@
 
 //! Prune things that are private
 
+use core::prelude::*;
+
 use extract;
 use syntax::ast;
 use syntax::ast_map;
diff --git a/src/librustdoc/rustdoc.rc b/src/librustdoc/rustdoc.rc
index fed8bc0..9b73e39 100644
--- a/src/librustdoc/rustdoc.rc
+++ b/src/librustdoc/rustdoc.rc
@@ -21,10 +21,16 @@
 
 #[allow(non_implicitly_copyable_typarams)];
 
-extern mod std;
+#[no_std];
+
+extern mod core(name = "std");
+extern mod std(name = "extra");
+
 extern mod rustc;
 extern mod syntax;
 
+use core::prelude::*;
+
 use config::Config;
 use doc::Item;
 use doc::ItemUtils;
diff --git a/src/librustdoc/sectionalize_pass.rs b/src/librustdoc/sectionalize_pass.rs
index afd29ab..6333e28 100644
--- a/src/librustdoc/sectionalize_pass.rs
+++ b/src/librustdoc/sectionalize_pass.rs
@@ -10,6 +10,8 @@
 
 //! Breaks rustdocs into sections according to their headers
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/text_pass.rs b/src/librustdoc/text_pass.rs
index 3b1a205..e6c6118 100644
--- a/src/librustdoc/text_pass.rs
+++ b/src/librustdoc/text_pass.rs
@@ -10,6 +10,8 @@
 
 //! Generic pass for performing an operation on all descriptions
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/tystr_pass.rs b/src/librustdoc/tystr_pass.rs
index 1268946..941faf3 100644
--- a/src/librustdoc/tystr_pass.rs
+++ b/src/librustdoc/tystr_pass.rs
@@ -10,6 +10,8 @@
 
 //! Pulls type information out of the AST and attaches it to the document
 
+use core::prelude::*;
+
 use astsrv;
 use doc::ItemUtils;
 use doc;
diff --git a/src/librustdoc/unindent_pass.rs b/src/librustdoc/unindent_pass.rs
index 1e3e4ac..ef34de1 100644
--- a/src/librustdoc/unindent_pass.rs
+++ b/src/librustdoc/unindent_pass.rs
@@ -19,6 +19,8 @@
 middle of a line, and each of the following lines is indented.
 */
 
+use core::prelude::*;
+
 use pass::Pass;
 use text_pass;
 
diff --git a/src/librustdoc/util.rs b/src/librustdoc/util.rs
index 0368b8a..fe39ac6 100644
--- a/src/librustdoc/util.rs
+++ b/src/librustdoc/util.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 // Just a named container for our op, so it can have impls
 pub struct NominalOp<T> {
     op: T
diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc
index 1671dfe..c79714b 100644
--- a/src/librusti/rusti.rc
+++ b/src/librusti/rusti.rc
@@ -18,11 +18,17 @@
 #[license = "MIT/ASL2"];
 #[crate_type = "lib"];
 
-extern mod std;
+#[no_std];
+
+extern mod core(name = "std");
+extern mod std(name = "extra");
+
 extern mod rustc;
 extern mod syntax;
 
+use core::prelude::*;
 use core::*;
+
 use core::cell::Cell;
 use rustc::driver::{driver, session};
 use syntax::{ast, diagnostic};
diff --git a/src/librustpkg/context.rs b/src/librustpkg/context.rs
index 348d828..4f67118 100644
--- a/src/librustpkg/context.rs
+++ b/src/librustpkg/context.rs
@@ -10,6 +10,8 @@
 
 // Context data structure used by rustpkg
 
+use core::prelude::*;
+
 use core::hashmap::HashMap;
 
 pub struct Ctx {
diff --git a/src/librustpkg/path_util.rs b/src/librustpkg/path_util.rs
index bbd8d09..700b333 100644
--- a/src/librustpkg/path_util.rs
+++ b/src/librustpkg/path_util.rs
@@ -10,6 +10,7 @@
 
 // rustpkg utilities having to do with paths and directories
 
+use core::prelude::*;
 pub use util::{PkgId, RemotePath, LocalPath};
 use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR};
 use core::os::mkdir_recursive;
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc
index 19dc973..79e978c 100644
--- a/src/librustpkg/rustpkg.rc
+++ b/src/librustpkg/rustpkg.rc
@@ -18,10 +18,15 @@
 #[license = "MIT/ASL2"];
 #[crate_type = "lib"];
 
-extern mod std;
+#[no_std];
+
+extern mod core(name = "std");
+extern mod std(name = "extra");
+
 extern mod rustc;
 extern mod syntax;
 
+use core::prelude::*;
 use core::*;
 pub use core::path::Path;
 use core::hashmap::HashMap;
diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs
index 94101c4..1425e68 100644
--- a/src/librustpkg/util.rs
+++ b/src/librustpkg/util.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 use core::*;
 use core::cmp::Ord;
 use core::hash::Streaming;
diff --git a/src/libstd/core.rc b/src/libstd/core.rc
index 6f4890c..f9c4612 100644
--- a/src/libstd/core.rc
+++ b/src/libstd/core.rc
@@ -47,7 +47,7 @@
 */
 
 
-#[link(name = "core",
+#[link(name = "std",
        vers = "0.7-pre",
        uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
        url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
@@ -64,10 +64,10 @@
 #[deny(non_camel_case_types)];
 
 // Make core testable by not duplicating lang items. See #2912
-#[cfg(test)] extern mod realcore(name = "core");
-#[cfg(test)] pub use kinds = realcore::kinds;
-#[cfg(test)] pub use ops = realcore::ops;
-#[cfg(test)] pub use cmp = realcore::cmp;
+#[cfg(test)] extern mod realstd(name = "std");
+#[cfg(test)] pub use kinds = realstd::kinds;
+#[cfg(test)] pub use ops = realstd::ops;
+#[cfg(test)] pub use cmp = realstd::cmp;
 
 // On Linux, link to the runtime with -lrt.
 #[cfg(target_os = "linux")]
@@ -213,8 +213,8 @@
 pub mod rt;
 
 // A curious inner-module that's not exported that contains the binding
-// 'core' so that macro-expanded references to core::error and such
-// can be resolved within libcore.
+// 'std' so that macro-expanded references to std::error and such
+// can be resolved within libstd.
 #[doc(hidden)]
 mod core {
     pub use clone;
@@ -225,3 +225,4 @@
     pub use sys;
     pub use pipes;
 }
+
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs
index e67b5d1..2d4bc9a 100644
--- a/src/libsyntax/abi.rs
+++ b/src/libsyntax/abi.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use core::to_bytes;
 
 #[deriving(Eq)]
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index a8ff8da..f82d8d3 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -10,6 +10,8 @@
 
 // The Rust abstract syntax tree.
 
+use core::prelude::*;
+
 use codemap::{span, spanned};
 use abi::AbiSet;
 use opt_vec::OptVec;
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index 5b08f59..e3ef565 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use abi::AbiSet;
 use ast::*;
 use ast;
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index e209fd1..2832030 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::*;
 use ast;
 use ast_util;
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 981df11..4ac4aee 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -10,6 +10,8 @@
 
 // Functions dealing with attributes and meta_items
 
+use core::prelude::*;
+
 use ast;
 use codemap::{spanned, dummy_spanned};
 use attr;
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 2e23598..5f701c4 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -21,6 +21,8 @@
 
 */
 
+use core::prelude::*;
+
 use core::to_bytes;
 use std::serialize::{Encodable, Decodable, Encoder, Decoder};
 
diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs
index 21e2ad8..528bc54 100644
--- a/src/libsyntax/diagnostic.rs
+++ b/src/libsyntax/diagnostic.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use codemap::{Pos, span};
 use codemap;
 
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs
index 162eced1..204eb9a 100644
--- a/src/libsyntax/ext/asm.rs
+++ b/src/libsyntax/ext/asm.rs
@@ -12,6 +12,8 @@
  * Inline assembly support.
  */
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base;
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 9b71fb9..311636e 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap;
 use codemap::{CodeMap, span, ExpnInfo, ExpandedFrom};
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 01a5041..58ea03f 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use abi::AbiSet;
 use ast::ident;
 use ast;
diff --git a/src/libsyntax/ext/concat_idents.rs b/src/libsyntax/ext/concat_idents.rs
index e6600e1..788f047 100644
--- a/src/libsyntax/ext/concat_idents.rs
+++ b/src/libsyntax/ext/concat_idents.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::*;
diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs
index 007826a..69e15a8 100644
--- a/src/libsyntax/ext/deriving/clone.rs
+++ b/src/libsyntax/ext/deriving/clone.rs
@@ -8,13 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{meta_item, item, expr};
 use codemap::span;
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
 use ext::deriving::generic::*;
 
-
 pub fn expand_deriving_clone(cx: @ExtCtxt,
                              span: span,
                              mitem: @meta_item,
diff --git a/src/libsyntax/ext/deriving/cmp/eq.rs b/src/libsyntax/ext/deriving/cmp/eq.rs
index 11c0a59..81434e8 100644
--- a/src/libsyntax/ext/deriving/cmp/eq.rs
+++ b/src/libsyntax/ext/deriving/cmp/eq.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{meta_item, item, expr};
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/cmp/ord.rs b/src/libsyntax/ext/deriving/cmp/ord.rs
index 9438e1b..7e549c25 100644
--- a/src/libsyntax/ext/deriving/cmp/ord.rs
+++ b/src/libsyntax/ext/deriving/cmp/ord.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use ast::{meta_item, item, expr};
 use codemap::span;
diff --git a/src/libsyntax/ext/deriving/cmp/totaleq.rs b/src/libsyntax/ext/deriving/cmp/totaleq.rs
index f1e952e..39764a7 100644
--- a/src/libsyntax/ext/deriving/cmp/totaleq.rs
+++ b/src/libsyntax/ext/deriving/cmp/totaleq.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use ast::{meta_item, item, expr};
 use codemap::span;
diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs
index e26f4a3..561a157 100644
--- a/src/libsyntax/ext/deriving/cmp/totalord.rs
+++ b/src/libsyntax/ext/deriving/cmp/totalord.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{meta_item, item, expr};
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/decodable.rs b/src/libsyntax/ext/deriving/decodable.rs
index a8c84e8..f3ea6f2 100644
--- a/src/libsyntax/ext/deriving/decodable.rs
+++ b/src/libsyntax/ext/deriving/decodable.rs
@@ -13,6 +13,8 @@
 encodable.rs for more.
 */
 
+use core::prelude::*;
+
 use ast;
 use ast::*;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs
index 72a1745..00f7b7a 100644
--- a/src/libsyntax/ext/deriving/encodable.rs
+++ b/src/libsyntax/ext/deriving/encodable.rs
@@ -75,6 +75,7 @@
     }
 */
 
+use core::prelude::*;
 
 use ast;
 use ast::*;
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs
index b61c787..49f7ea5 100644
--- a/src/libsyntax/ext/deriving/generic.rs
+++ b/src/libsyntax/ext/deriving/generic.rs
@@ -162,6 +162,8 @@
 
 */
 
+use core::prelude::*;
+
 use ast;
 use ast::{enum_def, expr, ident, Generics, struct_def};
 
diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs
index ae321c3..7a818a4 100644
--- a/src/libsyntax/ext/deriving/iter_bytes.rs
+++ b/src/libsyntax/ext/deriving/iter_bytes.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{meta_item, item, expr, and};
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index 7da66f8..e966826 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -18,6 +18,8 @@
 
 */
 
+use core::prelude::*;
+
 use ast;
 use ast::{Ty, enum_def, expr, ident, item, Generics, meta_item, struct_def};
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/rand.rs b/src/libsyntax/ext/deriving/rand.rs
index 16f7547..df92693 100644
--- a/src/libsyntax/ext/deriving/rand.rs
+++ b/src/libsyntax/ext/deriving/rand.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use ast::{meta_item, item, expr, ident};
 use codemap::span;
diff --git a/src/libsyntax/ext/deriving/to_str.rs b/src/libsyntax/ext/deriving/to_str.rs
index 89b4695..2e00bba 100644
--- a/src/libsyntax/ext/deriving/to_str.rs
+++ b/src/libsyntax/ext/deriving/to_str.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{meta_item, item, expr};
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs
index 99bc2d8..f8f7dc8 100644
--- a/src/libsyntax/ext/deriving/ty.rs
+++ b/src/libsyntax/ext/deriving/ty.rs
@@ -13,6 +13,8 @@
 explicit `Self` type to use when specifying impls to be derived.
 */
 
+use core::prelude::*;
+
 use ast;
 use ast::{expr,Generics,ident};
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/env.rs b/src/libsyntax/ext/env.rs
index 32fbc91..3e5fb93 100644
--- a/src/libsyntax/ext/env.rs
+++ b/src/libsyntax/ext/env.rs
@@ -14,6 +14,8 @@
  * interface.
  */
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::*;
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index b993162..c74a4df 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::{blk_, attribute_, attr_outer, meta_word};
 use ast::{crate, expr_, expr_mac, mac_invoc_tt};
 use ast::{item_mac, stmt_, stmt_mac, stmt_expr, stmt_semi};
diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs
index 55d3d4e..987f7fc 100644
--- a/src/libsyntax/ext/fmt.rs
+++ b/src/libsyntax/ext/fmt.rs
@@ -14,6 +14,8 @@
  * compiler syntax extension plugin interface.
  */
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::*;
diff --git a/src/libsyntax/ext/log_syntax.rs b/src/libsyntax/ext/log_syntax.rs
index a3f6fb8..423ade8 100644
--- a/src/libsyntax/ext/log_syntax.rs
+++ b/src/libsyntax/ext/log_syntax.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap;
 use ext::base::*;
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs
index 1f2e3f0..6d6db23 100644
--- a/src/libsyntax/ext/pipes/ast_builder.rs
+++ b/src/libsyntax/ext/pipes/ast_builder.rs
@@ -13,6 +13,9 @@
 // To start with, it will be use dummy spans, but it might someday do
 // something smarter.
 
+use core::prelude::*;
+
+use abi::AbiSet;
 use ast::ident;
 use ast;
 use codemap::span;
diff --git a/src/libsyntax/ext/pipes/check.rs b/src/libsyntax/ext/pipes/check.rs
index c0b7f5b..694a7c1c 100644
--- a/src/libsyntax/ext/pipes/check.rs
+++ b/src/libsyntax/ext/pipes/check.rs
@@ -29,6 +29,8 @@
 
 */
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs
index 8d45e47..9cdd35a 100644
--- a/src/libsyntax/ext/pipes/liveness.rs
+++ b/src/libsyntax/ext/pipes/liveness.rs
@@ -37,6 +37,8 @@
 
 */
 
+use core::prelude::*;
+
 use ext::base::ExtCtxt;
 use ext::pipes::proto::{protocol_};
 
diff --git a/src/libsyntax/ext/pipes/parse_proto.rs b/src/libsyntax/ext/pipes/parse_proto.rs
index 28c8c9a..67ef334 100644
--- a/src/libsyntax/ext/pipes/parse_proto.rs
+++ b/src/libsyntax/ext/pipes/parse_proto.rs
@@ -10,6 +10,8 @@
 
 // Parsing pipes protocols from token trees.
 
+use core::prelude::*;
+
 use ast_util;
 use ext::pipes::proto::*;
 use parse::common::SeqSep;
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index 0482dff..7ed375e 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -10,6 +10,8 @@
 
 // A protocol compiler for Rust.
 
+use core::prelude::*;
+
 use ast;
 use codemap::{dummy_sp, spanned};
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs
index 4471c5b..80e4520 100644
--- a/src/libsyntax/ext/pipes/proto.rs
+++ b/src/libsyntax/ext/pipes/proto.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 1c57d50..9a5645a 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::{BytePos, Pos, span};
 use ext::base::ExtCtxt;
@@ -29,6 +31,8 @@
 */
 
 pub mod rt {
+    use core::prelude::*;
+
     use ast;
     use ext::base::ExtCtxt;
     use parse;
diff --git a/src/libsyntax/ext/source_util.rs b/src/libsyntax/ext/source_util.rs
index 30e6b7c..73b84c2 100644
--- a/src/libsyntax/ext/source_util.rs
+++ b/src/libsyntax/ext/source_util.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap;
 use codemap::{FileMap, Loc, Pos, ExpandedFrom, span};
diff --git a/src/libsyntax/ext/trace_macros.rs b/src/libsyntax/ext/trace_macros.rs
index 25607a8..185d2fa 100644
--- a/src/libsyntax/ext/trace_macros.rs
+++ b/src/libsyntax/ext/trace_macros.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::span;
 use ext::base::ExtCtxt;
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index a34045a..be79722 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -9,6 +9,9 @@
 // except according to those terms.
 
 // Earley-like parser for macros.
+
+use core::prelude::*;
+
 use ast;
 use ast::{matcher, match_tok, match_seq, match_nonterminal, ident};
 use codemap::{BytePos, mk_sp};
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 3814243..04ac311 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use ast::{ident, matcher_, matcher, match_tok, match_nonterminal, match_seq};
 use ast::{tt_delim};
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index b13dc3f..3e63360 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use ast::{token_tree, tt_delim, tt_tok, tt_seq, tt_nonterminal,ident};
 use codemap::{span, dummy_sp};
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index 8b657b1..7094631 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast::*;
 use ast;
 use codemap::{span, spanned};
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index da7ad6f..66d2d46 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::{BytePos, CharPos, CodeMap, Pos};
 use diagnostic;
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs
index 6e85b81..7182b80 100644
--- a/src/libsyntax/parse/common.rs
+++ b/src/libsyntax/parse/common.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::{BytePos, spanned};
 use parse::lexer::reader;
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index 5340293..86284a3 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use codemap::{BytePos, CharPos, CodeMap, Pos, span};
 use codemap;
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs
index 0ce3ab4..34205e7 100644
--- a/src/libsyntax/parse/obsolete.rs
+++ b/src/libsyntax/parse/obsolete.rs
@@ -17,6 +17,7 @@
 removed.
 */
 
+use core::prelude::*;
 
 use ast::{expr, expr_lit, lit_nil, attribute};
 use ast;
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 4f81194..0a2d0ed 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use abi;
 use abi::AbiSet;
 use ast::{Sigil, BorrowedSigil, ManagedSigil, OwnedSigil};
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 055336a..1153c36 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use ast;
 use ast_util;
 use parse::token;
diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs
index 6b2ee61..4e2fd55 100644
--- a/src/libsyntax/print/pp.rs
+++ b/src/libsyntax/print/pp.rs
@@ -60,6 +60,9 @@
  * line (which it can't) and so naturally place the content on its own line to
  * avoid combining it with other lines and making matters even worse.
  */
+
+use core::prelude::*;
+
 #[deriving(Eq)]
 pub enum breaks { consistent, inconsistent, }
 
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index b5acdf8..9110bec 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
 
 use abi::AbiSet;
 use ast::{RegionTyParamBound, TraitTyParamBound, required, provided};
diff --git a/src/libsyntax/syntax.rc b/src/libsyntax/syntax.rc
index 0650df5..1b9b7b2 100644
--- a/src/libsyntax/syntax.rc
+++ b/src/libsyntax/syntax.rc
@@ -23,7 +23,13 @@
 #[allow(non_camel_case_types)];
 #[deny(deprecated_pattern)];
 
-extern mod std;
+#[no_core];
+#[no_std];
+
+extern mod core(name = "std");
+extern mod std(name = "extra");
+
+use core::prelude::*;
 
 pub mod util {
     pub mod interner;
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs
index 5d49c8c..e2736a0 100644
--- a/src/libsyntax/util/interner.rs
+++ b/src/libsyntax/util/interner.rs
@@ -12,6 +12,11 @@
 // allows bidirectional lookup; i.e. given a value, one can easily find the
 // type, and vice versa.
 
+// allow the interner_key macro to escape this module:
+#[macro_escape];
+
+use core::prelude::*;
+
 use core::cmp::Equiv;
 use core::hashmap::HashMap;
 use syntax::parse::token::StringRef;
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index 4cfd542..a2b8924 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use core::prelude::*;
+
 use abi::AbiSet;
 use ast::*;
 use ast;