about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-12-23 17:41:37 -0500
committerPatrick Walton <pcwalton@mimiga.net>2012-12-27 10:02:54 -0800
commit57c599914a19861686030b238a0edc7ebb996068 (patch)
treeda3e6ee27b1260b140dacf0085cc258f15279e38 /src/libstd
parent6b659392ea4a7a15226519f26d081431f624c466 (diff)
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/arc.rs17
-rw-r--r--src/libstd/arena.rs14
-rw-r--r--src/libstd/base64.rs6
-rw-r--r--src/libstd/bitv.rs5
-rw-r--r--src/libstd/c_vec.rs6
-rw-r--r--src/libstd/cell.rs3
-rw-r--r--src/libstd/cmp.rs4
-rw-r--r--src/libstd/comm.rs5
-rw-r--r--src/libstd/dbg.rs5
-rw-r--r--src/libstd/deque.rs8
-rw-r--r--src/libstd/ebml.rs20
-rw-r--r--src/libstd/flatpipes.rs52
-rw-r--r--src/libstd/fun_treemap.rs3
-rw-r--r--src/libstd/future.rs9
-rw-r--r--src/libstd/getopts.rs7
-rw-r--r--src/libstd/json.rs14
-rw-r--r--src/libstd/list.rs4
-rw-r--r--src/libstd/map.rs26
-rw-r--r--src/libstd/md4.rs4
-rw-r--r--src/libstd/net_ip.rs19
-rw-r--r--src/libstd/net_tcp.rs34
-rw-r--r--src/libstd/net_url.rs22
-rw-r--r--src/libstd/par.rs6
-rw-r--r--src/libstd/prettyprint.rs14
-rw-r--r--src/libstd/priority_queue.rs3
-rw-r--r--src/libstd/rl.rs6
-rw-r--r--src/libstd/rope.rs29
-rw-r--r--src/libstd/serialize.rs3
-rw-r--r--src/libstd/sha1.rs4
-rw-r--r--src/libstd/smallintmap.rs7
-rw-r--r--src/libstd/sort.rs6
-rw-r--r--src/libstd/std.rc4
-rw-r--r--src/libstd/sync.rs8
-rw-r--r--src/libstd/task_pool.rs7
-rw-r--r--src/libstd/tempfile.rs5
-rw-r--r--src/libstd/term.rs7
-rw-r--r--src/libstd/test.rs23
-rw-r--r--src/libstd/time.rs10
-rw-r--r--src/libstd/timer.rs16
-rw-r--r--src/libstd/uv_global_loop.rs11
-rw-r--r--src/libstd/uv_iotask.rs11
-rw-r--r--src/libstd/uv_ll.rs10
-rw-r--r--src/libstd/workcache.rs14
43 files changed, 375 insertions, 116 deletions
diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs
index e2bbda46d7c..63d15f8f76e 100644
--- a/src/libstd/arc.rs
+++ b/src/libstd/arc.rs
@@ -15,12 +15,17 @@
  * between tasks.
  */
 
-use private::{SharedMutableState, shared_mutable_state,
-                clone_shared_mutable_state, unwrap_shared_mutable_state,
-                get_shared_mutable_state, get_shared_immutable_state};
-use sync::{Mutex,  mutex_with_condvars,
-              RWlock, rwlock_with_condvars};
-
+use sync;
+use sync::{Mutex, mutex_with_condvars, RWlock, rwlock_with_condvars};
+
+use core::cast;
+use core::pipes;
+use core::private::{SharedMutableState, shared_mutable_state};
+use core::private::{clone_shared_mutable_state, unwrap_shared_mutable_state};
+use core::private::{get_shared_mutable_state, get_shared_immutable_state};
+use core::ptr;
+use core::task;
+use core::util;
 
 /// As sync::condvar, a mechanism for unlock-and-descheduling and signalling.
 pub struct Condvar { is_mutex: bool, failed: &mut bool, cond: &sync::Condvar }
diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs
index 9054f9355ad..9359a707d4c 100644
--- a/src/libstd/arena.rs
+++ b/src/libstd/arena.rs
@@ -34,10 +34,18 @@
 
 #[forbid(deprecated_mode)];
 
+use list;
 use list::{List, Cons, Nil};
-use cast::reinterpret_cast;
-use sys::TypeDesc;
-use libc::size_t;
+
+use core::at_vec;
+use core::cast::reinterpret_cast;
+use core::cast;
+use core::libc::size_t;
+use core::ptr;
+use core::sys::TypeDesc;
+use core::sys;
+use core::uint;
+use core::vec;
 
 #[abi = "rust-intrinsic"]
 extern mod rusti {
diff --git a/src/libstd/base64.rs b/src/libstd/base64.rs
index 43f13b5b91f..4cad9d1675d 100644
--- a/src/libstd/base64.rs
+++ b/src/libstd/base64.rs
@@ -9,7 +9,11 @@
 // except according to those terms.
 
 #[forbid(deprecated_mode)];
-use io::Reader;
+
+use core::io::Reader;
+use core::iter;
+use core::str;
+use core::vec;
 
 pub trait ToBase64 {
     pure fn to_base64() -> ~str;
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs
index 5b9dc6cf3a8..828de1eb546 100644
--- a/src/libstd/bitv.rs
+++ b/src/libstd/bitv.rs
@@ -10,7 +10,10 @@
 
 #[forbid(deprecated_mode)];
 
-use vec::{to_mut, from_elem};
+use core::ops;
+use core::uint;
+use core::vec::{to_mut, from_elem};
+use core::vec;
 
 struct SmallBitv {
     /// only the lowest nbits of this value are used. the rest is undefined.
diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs
index cc8cadb709d..42facbc20d0 100644
--- a/src/libstd/c_vec.rs
+++ b/src/libstd/c_vec.rs
@@ -37,6 +37,12 @@
  */
 #[forbid(deprecated_mode)];
 
+use core::libc;
+use core::oldcomm;
+use core::option;
+use core::ptr;
+use core::task;
+
 /**
  * The type representing a foreign chunk of memory
  *
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs
index b972ef953e4..29c75e629e9 100644
--- a/src/libstd/cell.rs
+++ b/src/libstd/cell.rs
@@ -9,6 +9,9 @@
 // except according to those terms.
 
 #[forbid(deprecated_mode)];
+
+use core::option;
+
 /// A dynamic, mutable location.
 ///
 /// Similar to a mutable option type, but friendlier.
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs
index 28ee8c81e73..7c126c7338b 100644
--- a/src/libstd/cmp.rs
+++ b/src/libstd/cmp.rs
@@ -11,6 +11,10 @@
 #[forbid(deprecated_mode)];
 /// Additional general-purpose comparison functionality.
 
+use core::f32;
+use core::f64;
+use core::float;
+
 const fuzzy_epsilon: float = 1.0e-6;
 
 pub trait FuzzyEq {
diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs
index 1055f3ea7df..850e53c2d48 100644
--- a/src/libstd/comm.rs
+++ b/src/libstd/comm.rs
@@ -17,8 +17,9 @@ Higher level communication abstractions.
 // NB: transitionary, de-mode-ing.
 #[forbid(deprecated_mode)];
 
-use pipes::{GenericChan, GenericSmartChan, GenericPort,
-            Chan, Port, Selectable, Peekable};
+use core::pipes::{GenericChan, GenericSmartChan, GenericPort};
+use core::pipes::{Chan, Port, Selectable, Peekable};
+use core::pipes;
 
 /// An extension of `pipes::stream` that allows both sending and receiving.
 pub struct DuplexStream<T: Owned, U: Owned> {
diff --git a/src/libstd/dbg.rs b/src/libstd/dbg.rs
index 75e25f75c6c..bcbe750ff7e 100644
--- a/src/libstd/dbg.rs
+++ b/src/libstd/dbg.rs
@@ -11,8 +11,9 @@
 #[forbid(deprecated_mode)];
 //! Unsafe debugging functions for inspecting values.
 
-use cast::reinterpret_cast;
-
+use core::cast::reinterpret_cast;
+use core::ptr;
+use core::sys;
 
 #[abi = "cdecl"]
 extern mod rustrt {
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs
index 687eff887c8..ff4fab0e1df 100644
--- a/src/libstd/deque.rs
+++ b/src/libstd/deque.rs
@@ -12,9 +12,11 @@
 #[forbid(deprecated_mode)];
 #[forbid(non_camel_case_types)];
 
-use option::{Some, None};
-use dvec::DVec;
-use core::cmp::{Eq};
+use core::cmp::Eq;
+use core::dvec::DVec;
+use core::dvec;
+use core::uint;
+use core::vec;
 
 pub trait Deque<T> {
     fn size() -> uint;
diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs
index 59e0a1e84fe..86cc15d068b 100644
--- a/src/libstd/ebml.rs
+++ b/src/libstd/ebml.rs
@@ -9,8 +9,14 @@
 // except according to those terms.
 
 #[forbid(deprecated_mode)];
+
 use serialize;
 
+use core::io;
+use core::ops;
+use core::str;
+use core::vec;
+
 // 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
@@ -54,6 +60,13 @@ enum EbmlEncoderTag {
 // --------------------------------------
 
 pub mod reader {
+    use serialize;
+
+    use core::int;
+    use core::io;
+    use core::ops;
+    use core::str;
+    use core::vec;
 
     // ebml reading
 
@@ -271,7 +284,7 @@ pub mod reader {
         fn read_u8 (&self) -> u8  { doc_as_u8 (self.next_doc(EsU8 )) }
         fn read_uint(&self) -> uint {
             let v = doc_as_u64(self.next_doc(EsUint));
-            if v > (core::uint::max_value as u64) {
+            if v > (::core::uint::max_value as u64) {
                 fail fmt!("uint %? too large for this architecture", v);
             }
             v as uint
@@ -385,6 +398,9 @@ pub mod reader {
 }
 
 pub mod writer {
+    use core::io;
+    use core::str;
+    use core::vec;
 
     // ebml writing
     pub struct Encoder {
@@ -546,7 +562,7 @@ pub mod writer {
         }
     }
 
-    impl Encoder: serialize::Encoder {
+    impl Encoder: ::serialize::Encoder {
         fn emit_nil(&self) {}
 
         fn emit_uint(&self, v: uint) {
diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs
index 1617641afe3..c1515a8b5e2 100644
--- a/src/libstd/flatpipes.rs
+++ b/src/libstd/flatpipes.rs
@@ -38,10 +38,13 @@ block the scheduler thread, so will their pipes.
 */
 
 // The basic send/recv interface FlatChan and PortChan will implement
+use core::io;
 use core::pipes::GenericChan;
 use core::pipes::GenericPort;
-
+use core::pipes;
 use core::sys::size_of;
+use core::uint;
+use core::vec;
 
 /**
 A FlatPort, consisting of a `BytePort` that recieves byte vectors,
@@ -69,18 +72,20 @@ pub struct FlatChan<T, F: Flattener<T>, C: ByteChan> {
 Constructors for flat pipes that using serialization-based flattening.
 */
 pub mod serial {
-
     pub use DefaultEncoder = ebml::writer::Encoder;
     pub use DefaultDecoder = ebml::reader::Decoder;
 
-    use core::io::{Reader, Writer};
-    use core::pipes::{Port, Chan};
     use serialize::{Decodable, Encodable};
     use flatpipes::flatteners::{DeserializingUnflattener,
                                 SerializingFlattener};
     use flatpipes::flatteners::{deserialize_buffer, serialize_value};
     use flatpipes::bytepipes::{ReaderBytePort, WriterByteChan};
     use flatpipes::bytepipes::{PipeBytePort, PipeByteChan};
+    use flatpipes::{FlatPort, FlatChan};
+
+    use core::io::{Reader, Writer};
+    use core::pipes::{Port, Chan};
+    use core::pipes;
 
     pub type ReaderPort<T, R> = FlatPort<
         T, DeserializingUnflattener<DefaultDecoder, T>,
@@ -141,7 +146,6 @@ pub mod serial {
         let (port, chan) = pipes::stream();
         return (pipe_port(move port), pipe_chan(move chan));
     }
-
 }
 
 // FIXME #4074 this doesn't correctly enforce POD bounds
@@ -159,9 +163,11 @@ pub mod pod {
 
     use core::io::{Reader, Writer};
     use core::pipes::{Port, Chan};
+    use core::pipes;
     use flatpipes::flatteners::{PodUnflattener, PodFlattener};
     use flatpipes::bytepipes::{ReaderBytePort, WriterByteChan};
     use flatpipes::bytepipes::{PipeBytePort, PipeByteChan};
+    use flatpipes::{FlatPort, FlatChan};
 
     pub type ReaderPort<T: Copy Owned, R> =
         FlatPort<T, PodUnflattener<T>, ReaderBytePort<R>>;
@@ -242,7 +248,7 @@ pub trait ByteChan {
 
 const CONTINUE: [u8 * 4] = [0xAA, 0xBB, 0xCC, 0xDD];
 
-impl<T, U: Unflattener<T>, P: BytePort> FlatPort<T, U, P>: GenericPort<T> {
+pub impl<T,U:Unflattener<T>,P:BytePort> FlatPort<T, U, P>: GenericPort<T> {
     fn recv() -> T {
         match self.try_recv() {
             Some(move val) => move val,
@@ -287,7 +293,7 @@ impl<T, U: Unflattener<T>, P: BytePort> FlatPort<T, U, P>: GenericPort<T> {
     }
 }
 
-impl<T, F: Flattener<T>, C: ByteChan> FlatChan<T, F, C>: GenericChan<T> {
+impl<T,F:Flattener<T>,C:ByteChan> FlatChan<T, F, C>: GenericChan<T> {
     fn send(val: T) {
         self.byte_chan.send(CONTINUE.to_vec());
         let bytes = self.flattener.flatten(move val);
@@ -299,7 +305,7 @@ impl<T, F: Flattener<T>, C: ByteChan> FlatChan<T, F, C>: GenericChan<T> {
     }
 }
 
-impl<T, U: Unflattener<T>, P: BytePort> FlatPort<T, U, P> {
+pub impl<T,U:Unflattener<T>,P:BytePort> FlatPort<T, U, P> {
     static fn new(u: U, p: P) -> FlatPort<T, U, P> {
         FlatPort {
             unflattener: move u,
@@ -308,7 +314,7 @@ impl<T, U: Unflattener<T>, P: BytePort> FlatPort<T, U, P> {
     }
 }
 
-impl<T, F: Flattener<T>, C: ByteChan> FlatChan<T, F, C> {
+pub impl<T,F:Flattener<T>,C:ByteChan> FlatChan<T, F, C> {
     static fn new(f: F, c: C) -> FlatChan<T, F, C> {
         FlatChan {
             flattener: move f,
@@ -319,14 +325,16 @@ impl<T, F: Flattener<T>, C: ByteChan> FlatChan<T, F, C> {
 
 
 pub mod flatteners {
+    use ebml;
+    use flatpipes::util::BufReader;
+    use json;
+    use serialize::{Encoder, Decoder, Encodable, Decodable};
 
-    use core::sys::size_of;
-
-    use serialize::{Encoder, Decoder,
-                        Encodable, Decodable};
-
+    use core::cast;
     use core::io::{Writer, Reader, BytesWriter, ReaderUtil};
-    use flatpipes::util::BufReader;
+    use core::ptr;
+    use core::sys::size_of;
+    use core::vec;
 
     // XXX: Is copy/send equivalent to pod?
     pub struct PodUnflattener<T: Copy Owned> {
@@ -488,9 +496,9 @@ pub mod flatteners {
 }
 
 pub mod bytepipes {
-
     use core::io::{Writer, Reader, ReaderUtil};
     use core::pipes::{Port, Chan};
+    use core::pipes;
 
     pub struct ReaderBytePort<R: Reader> {
         reader: R
@@ -556,12 +564,12 @@ pub mod bytepipes {
     pub impl PipeBytePort: BytePort {
         fn try_recv(&self, count: uint) -> Option<~[u8]> {
             if self.buf.len() >= count {
-                let mut bytes = core::util::replace(&mut self.buf, ~[]);
+                let mut bytes = ::core::util::replace(&mut self.buf, ~[]);
                 self.buf = bytes.slice(count, bytes.len());
                 bytes.truncate(count);
                 return Some(bytes);
             } else if self.buf.len() > 0 {
-                let mut bytes = core::util::replace(&mut self.buf, ~[]);
+                let mut bytes = ::core::util::replace(&mut self.buf, ~[]);
                 assert count > bytes.len();
                 match self.try_recv(count - bytes.len()) {
                     Some(move rest) => {
@@ -580,7 +588,7 @@ pub mod bytepipes {
                     None => return None
                 }
             } else {
-                core::util::unreachable()
+                ::core::util::unreachable()
             }
         }
     }
@@ -612,8 +620,8 @@ pub mod bytepipes {
 
 // XXX: This belongs elsewhere
 mod util {
-
-    use io::{Reader, BytesReader};
+    use core::io::{Reader, BytesReader};
+    use core::io;
 
     pub struct BufReader {
         buf: ~[u8],
@@ -632,7 +640,7 @@ mod util {
             // Recreating the BytesReader state every call since
             // I can't get the borrowing to work correctly
             let bytes_reader = BytesReader {
-                bytes: core::util::id::<&[u8]>(self.buf),
+                bytes: ::core::util::id::<&[u8]>(self.buf),
                 pos: self.pos
             };
 
diff --git a/src/libstd/fun_treemap.rs b/src/libstd/fun_treemap.rs
index 1eccb5a8d92..6a24e1e5817 100644
--- a/src/libstd/fun_treemap.rs
+++ b/src/libstd/fun_treemap.rs
@@ -22,8 +22,7 @@
  */
 
 use core::cmp::{Eq, Ord};
-use option::{Some, None};
-use option = option;
+use core::option::{Some, None};
 
 pub type Treemap<K, V> = @TreeNode<K, V>;
 
diff --git a/src/libstd/future.rs b/src/libstd/future.rs
index 2a72c2f696a..ccb26a4439d 100644
--- a/src/libstd/future.rs
+++ b/src/libstd/future.rs
@@ -21,9 +21,12 @@
  * ~~~
  */
 
-use either::Either;
-use pipes::{recv, oneshot, ChanOne, PortOne, send_one, recv_one};
-use cast::copy_lifetime;
+use core::cast::copy_lifetime;
+use core::cast;
+use core::either::Either;
+use core::option;
+use core::pipes::{recv, oneshot, ChanOne, PortOne, send_one, recv_one};
+use core::task;
 
 #[doc = "The future type"]
 pub struct Future<A> {
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index 38540524dac..acbe32c74dc 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -76,8 +76,11 @@
 
 use core::cmp::Eq;
 use core::result::{Err, Ok};
+use core::result;
 use core::option;
 use core::option::{Some, None};
+use core::str;
+use core::vec;
 
 #[deriving_eq]
 enum Name {
@@ -450,6 +453,10 @@ enum FailType {
  *  groups of short and long option names, together.
  */
 pub mod groups {
+    use getopts::Result;
+
+    use core::str;
+    use core::vec;
 
     /** one group of options, e.g., both -h and --help, along with
      * their shared description and properties
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 770d621d51f..c3f30c45e62 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -15,11 +15,19 @@
 
 //! json serialization
 
-use core::cmp::{Eq, Ord};
-use io::{WriterUtil, ReaderUtil};
-use send_map::linear;
+use serialize;
 use sort::Sort;
 
+use core::char;
+use core::cmp::{Eq, Ord};
+use core::float;
+use core::io::{WriterUtil, ReaderUtil};
+use core::io;
+use core::send_map::linear;
+use core::str;
+use core::to_str;
+use core::vec;
+
 /// Represents a json value
 pub enum Json {
     Number(float),
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index e41aab8ec1f..5922b20300e 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -13,8 +13,8 @@
 
 use core::cmp::Eq;
 use core::option;
-use option::*;
-use option::{Some, None};
+use core::option::*;
+use core::vec;
 
 #[deriving_eq]
 pub enum List<T> {
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index 39124dfbfba..0e5a7972838 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -11,14 +11,17 @@
 //! A map type
 #[forbid(deprecated_mode)];
 
-use io::WriterUtil;
-use to_str::ToStr;
-use mutable::Mut;
-use send_map::linear::LinearMap;
-
 use core::cmp::Eq;
-use hash::Hash;
-use to_bytes::IterBytes;
+use core::hash::Hash;
+use core::io::WriterUtil;
+use core::io;
+use core::ops;
+use core::to_str::ToStr;
+use core::mutable::Mut;
+use core::send_map::linear::LinearMap;
+use core::to_bytes::IterBytes;
+use core::uint;
+use core::vec;
 
 /// A convenience type to treat a hashmap as a set
 pub type Set<K:Eq IterBytes Hash> = HashMap<K, ()>;
@@ -103,7 +106,7 @@ pub trait Map<K:Eq IterBytes Hash Copy, V: Copy> {
     pure fn each_value_ref(fn(value: &V) -> bool);
 }
 
-mod util {
+pub mod util {
     pub type Rational = {num: int, den: int}; // : int::positive(*.den);
 
     pub pure fn rational_leq(x: Rational, y: Rational) -> bool {
@@ -117,6 +120,13 @@ mod util {
 // FIXME (#2344): package this up and export it as a datatype usable for
 // external code that doesn't want to pay the cost of a box.
 pub mod chained {
+    use map::util;
+
+    use core::io;
+    use core::ops;
+    use core::option;
+    use core::uint;
+    use core::vec;
 
     const initial_capacity: uint = 32u; // 2^5
 
diff --git a/src/libstd/md4.rs b/src/libstd/md4.rs
index 8e58a010f46..d10533008d9 100644
--- a/src/libstd/md4.rs
+++ b/src/libstd/md4.rs
@@ -10,6 +10,10 @@
 
 #[forbid(deprecated_mode)];
 
+use core::str;
+use core::uint;
+use core::vec;
+
 pub pure fn md4(msg: &[u8]) -> {a: u32, b: u32, c: u32, d: u32} {
     // subtle: if orig_len is merely uint, then the code below
     // which performs shifts by 32 bits or more has undefined
diff --git a/src/libstd/net_ip.rs b/src/libstd/net_ip.rs
index 1eb970526c3..ebe0ac690fe 100644
--- a/src/libstd/net_ip.rs
+++ b/src/libstd/net_ip.rs
@@ -11,6 +11,14 @@
 //! Types/fns concerning Internet Protocol (IP), versions 4 & 6
 #[forbid(deprecated_mode)];
 
+use core::libc;
+use core::oldcomm;
+use core::ptr;
+use core::result;
+use core::str;
+use core::uint;
+use core::vec;
+
 use iotask = uv::iotask::IoTask;
 use interact = uv::iotask::interact;
 
@@ -139,6 +147,14 @@ pub fn get_addr(node: &str, iotask: iotask)
 }
 
 pub mod v4 {
+    use uv::ll;
+
+    use core::ptr;
+    use core::result;
+    use core::str;
+    use core::uint;
+    use core::vec;
+
     /**
      * Convert a str to `ip_addr`
      *
@@ -225,6 +241,9 @@ pub mod v4 {
     }
 }
 pub mod v6 {
+    use core::result;
+    use core::str;
+
     /**
      * Convert a str to `ip_addr`
      *
diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs
index c888b457356..ca365e2a7d3 100644
--- a/src/libstd/net_tcp.rs
+++ b/src/libstd/net_tcp.rs
@@ -12,13 +12,23 @@
 // XXX Need FFI fixes
 #[allow(deprecated_mode)];
 
+use future;
+use future_spawn = future::spawn;
 use ip = net_ip;
+use uv;
 use uv::iotask;
 use uv::iotask::IoTask;
-use future_spawn = future::spawn;
-use result::{Result};
-use libc::size_t;
-use io::{Reader, ReaderUtil, Writer};
+
+use core::io::{Reader, ReaderUtil, Writer};
+use core::io;
+use core::libc::size_t;
+use core::libc;
+use core::oldcomm;
+use core::ptr;
+use core::result::{Result};
+use core::result;
+use core::uint;
+use core::vec;
 
 #[nolink]
 extern mod rustrt {
@@ -901,6 +911,8 @@ fn tear_down_socket_data(socket_data: @TcpSocketData) unsafe {
 // shared implementation for tcp::read
 fn read_common_impl(socket_data: *TcpSocketData, timeout_msecs: uint)
     -> result::Result<~[u8],TcpErrData> unsafe {
+    use timer;
+
     log(debug, ~"starting tcp::read");
     let iotask = (*socket_data).iotask;
     let rs_result = read_start_common_impl(socket_data);
@@ -1258,6 +1270,17 @@ type TcpBufferedSocketData = {
 
 //#[cfg(test)]
 mod test {
+    use net;
+    use net::ip;
+    use uv;
+
+    use core::io;
+    use core::oldcomm;
+    use core::result;
+    use core::str;
+    use core::task;
+    use core::vec;
+
     // FIXME don't run on fbsd or linux 32 bit (#2064)
     #[cfg(target_os="win32")]
     #[cfg(target_os="darwin")]
@@ -1566,7 +1589,8 @@ mod test {
     }
 
     fn impl_tcp_socket_impl_reader_handles_eof() {
-        use io::{Reader,ReaderUtil};
+        use core::io::{Reader,ReaderUtil};
+
         let hl_loop = uv::global_loop::get();
         let server_ip = ~"127.0.0.1";
         let server_port = 10041u;
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index a6ba728ccbb..f920e7e9da6 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -11,8 +11,24 @@
 //! Types/fns concerning URLs (see RFC 3986)
 #[forbid(deprecated_mode)];
 
-use io::ReaderUtil;
-use send_map::linear::LinearMap;
+use map;
+use map::HashMap;
+
+use core::cmp::Eq;
+use core::dvec::DVec;
+use core::from_str::FromStr;
+use core::io::{Reader, ReaderUtil};
+use core::io;
+use core::send_map::linear::LinearMap;
+use core::send_map;
+use core::str;
+use core::to_bytes::IterBytes;
+use core::to_bytes;
+use core::to_str::ToStr;
+use core::to_str;
+use core::uint;
+use core::util;
+use core::vec;
 
 #[deriving_eq]
 struct Url {
@@ -654,7 +670,7 @@ pub pure fn from_str(rawurl: &str) -> Result<Url, ~str> {
     Ok(Url::new(scheme, userinfo, host, port, path, query, fragment))
 }
 
-impl Url: from_str::FromStr {
+impl Url: FromStr {
     static pure fn from_str(s: &str) -> Option<Url> {
         match from_str(s) {
             Ok(move url) => Some(url),
diff --git a/src/libstd/par.rs b/src/libstd/par.rs
index 10cbcaa0c3b..d88d298ef18 100644
--- a/src/libstd/par.rs
+++ b/src/libstd/par.rs
@@ -10,6 +10,12 @@
 
 #[forbid(deprecated_mode)];
 
+use core::cast;
+use core::ptr;
+use core::sys;
+use core::uint;
+use core::vec;
+
 use future_spawn = future::spawn;
 
 
diff --git a/src/libstd/prettyprint.rs b/src/libstd/prettyprint.rs
index ef26a8cb190..87699a9c894 100644
--- a/src/libstd/prettyprint.rs
+++ b/src/libstd/prettyprint.rs
@@ -10,19 +10,21 @@
 
 #[forbid(deprecated_mode)];
 
-use io::Writer;
-use io::WriterUtil;
 use serialize;
 
-pub struct Encoder {
+use core::io::Writer;
+use core::io::WriterUtil;
+use core::io;
+
+pub struct Serializer {
     wr: io::Writer,
 }
 
-pub fn Encoder(wr: io::Writer) -> Encoder {
-    Encoder { wr: wr }
+pub fn Serializer(wr: io::Writer) -> Serializer {
+    Serializer { wr: wr }
 }
 
-pub impl Encoder: serialize::Encoder {
+pub impl Serializer: serialize::Encoder {
     fn emit_nil(&self) {
         self.wr.write_str(~"()")
     }
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs
index 642b27fa465..42818676359 100644
--- a/src/libstd/priority_queue.rs
+++ b/src/libstd/priority_queue.rs
@@ -2,7 +2,8 @@
 //! A priority queue implemented with a binary heap
 
 use core::cmp::Ord;
-use ptr::addr_of;
+use core::ptr::addr_of;
+use core::vec;
 
 #[abi = "rust-intrinsic"]
 extern "C" mod rusti {
diff --git a/src/libstd/rl.rs b/src/libstd/rl.rs
index b8cd1dc3ca2..f384cceb41b 100644
--- a/src/libstd/rl.rs
+++ b/src/libstd/rl.rs
@@ -11,7 +11,9 @@
 // FIXME #3921. This is unsafe because linenoise uses global mutable
 // state without mutexes.
 
-use libc::{c_char, c_int};
+use core::libc::{c_char, c_int};
+use core::str;
+use core::task;
 
 extern mod rustrt {
     #[legacy_exports];
@@ -79,4 +81,4 @@ pub unsafe fn complete(cb: CompletionCb) unsafe {
     }
 
     rustrt::linenoiseSetCompletionCallback(callback);
-}
\ No newline at end of file
+}
diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs
index aa78d22e4c8..7196dfad8e5 100644
--- a/src/libstd/rope.rs
+++ b/src/libstd/rope.rs
@@ -35,6 +35,13 @@
 
 #[forbid(deprecated_mode)];
 
+use core::cast;
+use core::char;
+use core::option;
+use core::str;
+use core::uint;
+use core::vec;
+
 /// The type of ropes.
 pub type Rope = node::Root;
 
@@ -441,6 +448,8 @@ pub fn loop_leaves(rope: Rope, it: fn(node::Leaf) -> bool) -> bool{
 
 pub mod iterator {
     pub mod leaf {
+        use rope::node;
+
         pub fn start(rope: Rope) -> node::leaf_iterator::T {
             match (rope) {
               node::Empty      => return node::leaf_iterator::empty(),
@@ -452,6 +461,8 @@ pub mod iterator {
         }
     }
     pub mod char {
+        use rope::node;
+
         pub fn start(rope: Rope) -> node::char_iterator::T {
             match (rope) {
               node::Empty      => return node::char_iterator::empty(),
@@ -543,7 +554,15 @@ pub fn char_at(rope: Rope, pos: uint) -> char {
 /*
  Section: Implementation
 */
-mod node {
+pub mod node {
+    use rope::node;
+
+    use core::cast;
+    use core::char;
+    use core::option;
+    use core::str;
+    use core::uint;
+    use core::vec;
 
     /// Implementation of type `rope`
     pub enum Root {
@@ -1116,6 +1135,9 @@ mod node {
     }
 
     pub mod leaf_iterator {
+        use core::option;
+        use core::vec;
+
         pub type T = {
             stack:            ~[mut @Node],
             mut stackpos: int
@@ -1153,6 +1175,11 @@ mod node {
     }
 
     pub mod char_iterator {
+        use rope::node::leaf_iterator;
+
+        use core::option;
+        use core::str;
+
         pub type T = {
             leaf_iterator: leaf_iterator::T,
             mut leaf:  Option<Leaf>,
diff --git a/src/libstd/serialize.rs b/src/libstd/serialize.rs
index 9b194925693..97d5ad18780 100644
--- a/src/libstd/serialize.rs
+++ b/src/libstd/serialize.rs
@@ -17,6 +17,9 @@ Core encoding and decoding interfaces.
 #[forbid(deprecated_mode)];
 #[forbid(non_camel_case_types)];
 
+use core::at_vec;
+use core::vec;
+
 pub trait Encoder {
     // Primitive types:
     fn emit_nil(&self);
diff --git a/src/libstd/sha1.rs b/src/libstd/sha1.rs
index 1a005bdc03f..264a8791e01 100644
--- a/src/libstd/sha1.rs
+++ b/src/libstd/sha1.rs
@@ -24,6 +24,10 @@
 
 #[forbid(deprecated_mode)];
 
+use core::str;
+use core::uint;
+use core::vec;
+
 /*
  * A SHA-1 implementation derived from Paul E. Jones's reference
  * implementation, which is written for clarity, not speed. At some
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs
index b16cf99cb4e..e412d237e65 100644
--- a/src/libstd/smallintmap.rs
+++ b/src/libstd/smallintmap.rs
@@ -14,10 +14,13 @@
  */
 #[forbid(deprecated_mode)];
 
+use map;
+use map::Map;
+
+use core::dvec::DVec;
+use core::ops;
 use core::option;
 use core::option::{Some, None};
-use dvec::DVec;
-use map::Map;
 
 // FIXME (#2347): Should not be @; there's a bug somewhere in rustc that
 // requires this to be.
diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs
index 316e23ef7ac..b497f63b674 100644
--- a/src/libstd/sort.rs
+++ b/src/libstd/sort.rs
@@ -11,9 +11,11 @@
 //! Sorting methods
 #[forbid(deprecated_mode)];
 
-use vec::{len, push};
 use core::cmp::{Eq, Ord};
-use dvec::DVec;
+use core::dvec::DVec;
+use core::util;
+use core::vec::{len, push};
+use core::vec;
 
 type Le<T> = pure fn(v1: &T, v2: &T) -> bool;
 
diff --git a/src/libstd/std.rc b/src/libstd/std.rc
index f3781c38676..669c8b14fd9 100644
--- a/src/libstd/std.rc
+++ b/src/libstd/std.rc
@@ -26,8 +26,6 @@ not required in or otherwise suitable for the core library.
 #[license = "MIT"];
 #[crate_type = "lib"];
 
-#[no_core];
-
 #[allow(vecs_implicitly_copyable)];
 #[deny(non_camel_case_types)];
 // XXX this is set to allow because there are two methods in encoding
@@ -35,6 +33,8 @@ not required in or otherwise suitable for the core library.
 #[allow(deprecated_mode)];
 #[forbid(deprecated_pattern)];
 
+#[no_core];
+
 extern mod core(vers = "0.6");
 use core::*;
 
diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs
index e1b029c5396..66a3d649956 100644
--- a/src/libstd/sync.rs
+++ b/src/libstd/sync.rs
@@ -17,7 +17,13 @@
  * in std.
  */
 
-use private::{Exclusive, exclusive};
+use core::option;
+use core::pipes;
+use core::private::{Exclusive, exclusive};
+use core::ptr;
+use core::task;
+use core::util;
+use core::vec;
 
 /****************************************************************************
  * Internals
diff --git a/src/libstd/task_pool.rs b/src/libstd/task_pool.rs
index a87576789af..35bea7b01b4 100644
--- a/src/libstd/task_pool.rs
+++ b/src/libstd/task_pool.rs
@@ -11,8 +11,11 @@
 /// A task pool abstraction. Useful for achieving predictable CPU
 /// parallelism.
 
-use pipes::{Chan, Port};
-use task::{SchedMode, SingleThreaded};
+use core::pipes::{Chan, Port};
+use core::pipes;
+use core::task::{SchedMode, SingleThreaded};
+use core::task;
+use core::vec;
 
 enum Msg<T> {
     Execute(~fn(&T)),
diff --git a/src/libstd/tempfile.rs b/src/libstd/tempfile.rs
index 25ea4ad7bb5..afb9290f6cf 100644
--- a/src/libstd/tempfile.rs
+++ b/src/libstd/tempfile.rs
@@ -12,8 +12,9 @@
 
 #[forbid(deprecated_mode)];
 
-use core::option;
-use option::{None, Some};
+use core::os;
+use core::rand;
+use core::str;
 
 pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option<Path> {
     let r = rand::Rng();
diff --git a/src/libstd/term.rs b/src/libstd/term.rs
index 5ec0f934440..ae5949e6f18 100644
--- a/src/libstd/term.rs
+++ b/src/libstd/term.rs
@@ -11,7 +11,12 @@
 //! Simple ANSI color library
 #[forbid(deprecated_mode)];
 
-use core::Option;
+use core::i32;
+use core::io;
+use core::option;
+use core::os;
+use core::str;
+use core::vec;
 
 // FIXME (#2807): Windows support.
 
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index d365077d063..a3959295735 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -17,17 +17,28 @@
 
 #[forbid(deprecated_mode)];
 
+use getopts;
+use sort;
+use term;
+
 use core::cmp::Eq;
-use either::Either;
-use result::{Ok, Err};
-use io::WriterUtil;
-use libc::size_t;
-use task::TaskBuilder;
+use core::either::Either;
+use core::either;
+use core::io::WriterUtil;
+use core::io;
+use core::libc::size_t;
+use core::oldcomm;
+use core::option;
+use core::result;
+use core::str;
+use core::task::TaskBuilder;
+use core::task;
+use core::vec;
 
 #[abi = "cdecl"]
 extern mod rustrt {
     #[legacy_exports];
-    fn rust_sched_threads() -> libc::size_t;
+    fn rust_sched_threads() -> size_t;
 }
 
 // The name of a test. By convention this follows the rules for rust
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 1058910c35a..61f9dbb6cea 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -11,9 +11,13 @@
 #[forbid(deprecated_mode)];
 
 use core::cmp::Eq;
-use libc::{c_char, c_int, c_long, size_t, time_t};
-use io::{Reader, ReaderUtil};
-use result::{Result, Ok, Err};
+use core::int;
+use core::libc::{c_char, c_int, c_long, size_t, time_t};
+use core::i32;
+use core::io::{Reader, ReaderUtil};
+use core::io;
+use core::result::{Result, Ok, Err};
+use core::str;
 
 #[abi = "cdecl"]
 extern mod rustrt {
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs
index c3a2a11e1f8..ae132af8b6b 100644
--- a/src/libstd/timer.rs
+++ b/src/libstd/timer.rs
@@ -12,9 +12,16 @@
 
 #[forbid(deprecated_mode)];
 
+use uv;
 use uv::iotask;
 use uv::iotask::IoTask;
 
+use core::either;
+use core::libc;
+use core::oldcomm;
+use core::ptr;
+use core;
+
 /**
  * Wait for timeout period then send provided value over a channel
  *
@@ -32,7 +39,9 @@ use uv::iotask::IoTask;
  * * val - a value of type T to send over the provided `ch`
  */
 pub fn delayed_send<T: Owned>(iotask: IoTask,
-                                  msecs: uint, ch: oldcomm::Chan<T>, val: T) {
+                              msecs: uint,
+                              ch: oldcomm::Chan<T>,
+                              val: T) {
         unsafe {
             let timer_done_po = oldcomm::Port::<()>();
             let timer_done_ch = oldcomm::Chan(&timer_done_po);
@@ -108,8 +117,9 @@ pub fn sleep(iotask: IoTask, msecs: uint) {
  * be a `some(T)`. If not, then `none` will be returned.
  */
 pub fn recv_timeout<T: Copy Owned>(iotask: IoTask,
-                              msecs: uint,
-                              wait_po: oldcomm::Port<T>) -> Option<T> {
+                                   msecs: uint,
+                                   wait_po: oldcomm::Port<T>)
+                                -> Option<T> {
     let timeout_po = oldcomm::Port::<()>();
     let timeout_ch = oldcomm::Chan(&timeout_po);
     delayed_send(iotask, msecs, timeout_ch, ());
diff --git a/src/libstd/uv_global_loop.rs b/src/libstd/uv_global_loop.rs
index 2efbfae3da4..0cbfbe87de4 100644
--- a/src/libstd/uv_global_loop.rs
+++ b/src/libstd/uv_global_loop.rs
@@ -16,10 +16,15 @@ use ll = uv_ll;
 use iotask = uv_iotask;
 use get_gl = get;
 use uv_iotask::{IoTask, spawn_iotask};
-use private::{chan_from_global_ptr, weaken_task};
+
+use core::either::{Left, Right};
+use core::libc;
 use core::oldcomm::{Port, Chan, select2, listen};
-use task::TaskBuilder;
-use either::{Left, Right};
+use core::private::{chan_from_global_ptr, weaken_task};
+use core::str;
+use core::task::TaskBuilder;
+use core::task;
+use core::vec;
 
 extern mod rustrt {
     fn rust_uv_get_kernel_global_chan_ptr() -> *libc::uintptr_t;
diff --git a/src/libstd/uv_iotask.rs b/src/libstd/uv_iotask.rs
index d778606075d..ed2da88bac4 100644
--- a/src/libstd/uv_iotask.rs
+++ b/src/libstd/uv_iotask.rs
@@ -16,12 +16,15 @@
  */
 #[forbid(deprecated_mode)];
 
-use libc::c_void;
-use ptr::addr_of;
-use core::oldcomm::{Port, Chan, listen};
-use task::TaskBuilder;
 use ll = uv_ll;
 
+use core::libc::c_void;
+use core::libc;
+use core::oldcomm::{Port, Chan, listen};
+use core::ptr::addr_of;
+use core::task::TaskBuilder;
+use core::task;
+
 /// Used to abstract-away direct interaction with a libuv loop.
 pub enum IoTask {
     IoTask_({
diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs
index 65333b41864..b4d617afdee 100644
--- a/src/libstd/uv_ll.rs
+++ b/src/libstd/uv_ll.rs
@@ -32,8 +32,12 @@
 
 #[allow(non_camel_case_types)]; // C types
 
-use libc::size_t;
-use ptr::to_unsafe_ptr;
+use core::libc::size_t;
+use core::libc;
+use core::ptr::to_unsafe_ptr;
+use core::ptr;
+use core::str;
+use core::vec;
 
 // libuv struct mappings
 pub type uv_ip4_addr = {
@@ -315,6 +319,8 @@ pub type uv_getaddrinfo_t = {
 };
 
 pub mod uv_ll_struct_stubgen {
+    use core::ptr;
+
     pub fn gen_stub_uv_tcp_t() -> uv_tcp_t {
         return gen_stub_os();
         #[cfg(target_os = "linux")]
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 4d49e98a8b7..45c95146e8e 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -8,15 +8,19 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use core::cmp::Eq;
-use send_map::linear::LinearMap;
-use pipes::{recv, oneshot, PortOne, send_one};
-use either::{Right,Left,Either};
-
 use json;
 use sha1;
 use serialize::{Encoder, Encodable, Decoder, Decodable};
 
+use core::either::{Either, Left, Right};
+use core::io;
+use core::option;
+use core::pipes::{recv, oneshot, PortOne, send_one};
+use core::result;
+use core::send_map::linear::LinearMap;
+use core::task;
+use core::to_bytes;
+
 /**
 *
 * This is a loose clone of the fbuild build system, made a touch more