about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-01 10:44:43 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-03-02 16:49:30 -0800
commita3f728238bb49759a3b3b64599808c3265f2caca (patch)
tree21c17b2996b9384e16e64349f6a4413975119f01 /src/libstd
parent347d19934db06f0467377ec138e7415a119f2a3c (diff)
downloadrust-a3f728238bb49759a3b3b64599808c3265f2caca.tar.gz
rust-a3f728238bb49759a3b3b64599808c3265f2caca.zip
librustc: Forbid chained imports and fix the logic for one-level renaming imports
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/bigint.rs2
-rw-r--r--src/libstd/flatpipes.rs4
-rw-r--r--src/libstd/semver.rs14
-rw-r--r--src/libstd/std.rc2
-rw-r--r--src/libstd/test.rs11
-rw-r--r--src/libstd/timer.rs2
-rw-r--r--src/libstd/uv_global_loop.rs15
-rw-r--r--src/libstd/workcache.rs2
8 files changed, 25 insertions, 27 deletions
diff --git a/src/libstd/bigint.rs b/src/libstd/bigint.rs
index 23a4769775c..5212a17f373 100644
--- a/src/libstd/bigint.rs
+++ b/src/libstd/bigint.rs
@@ -865,7 +865,7 @@ pub impl BigInt {
 mod biguint_tests {
 
     use core::*;
-    use num::{IntConvertible, Zero, One};
+    use core::num::{IntConvertible, Zero, One};
     use super::{BigInt, BigUint, BigDigit};
 
     #[test]
diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs
index 73dbe4bea57..42f954f7c39 100644
--- a/src/libstd/flatpipes.rs
+++ b/src/libstd/flatpipes.rs
@@ -771,10 +771,10 @@ mod test {
         writer_chan: WriterChanFactory<F>,
         port: uint) {
 
-        use net::tcp;
+        use core::cell::Cell;
         use net::ip;
-        use cell::Cell;
         use net::tcp::TcpSocket;
+        use net::tcp;
         use uv;
 
         // Indicate to the client task that the server is listening
diff --git a/src/libstd/semver.rs b/src/libstd/semver.rs
index 5f96687127c..7c7f3390f2e 100644
--- a/src/libstd/semver.rs
+++ b/src/libstd/semver.rs
@@ -10,14 +10,14 @@
 
 //! Semver parsing and logic
 
-use io;
-use io::{ReaderUtil};
-use option::{Option, Some, None};
-use uint;
-use str;
-use to_str::ToStr;
-use char;
+use core::char;
 use core::cmp;
+use core::io::{ReaderUtil};
+use core::io;
+use core::option::{Option, Some, None};
+use core::str;
+use core::to_str::ToStr;
+use core::uint;
 
 #[deriving_eq]
 pub enum Identifier {
diff --git a/src/libstd/std.rc b/src/libstd/std.rc
index 2f6c4e3f190..f29872bf387 100644
--- a/src/libstd/std.rc
+++ b/src/libstd/std.rc
@@ -113,7 +113,7 @@ pub mod serialize;
 // 'std' so that macro-expanded references to std::serialize and such
 // can be resolved within libcore.
 #[doc(hidden)] // FIXME #3538
-mod std {
+pub mod std {
     pub use serialize;
     pub use test;
 }
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 49a8dff4a96..3ebebe59d94 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -594,15 +594,14 @@ fn calc_result(desc: &TestDesc, task_succeeded: bool) -> TestResult {
 }
 
 pub mod bench {
-
-    use rand;
-    use u64;
-    use vec;
     use time::precise_time_ns;
     use test::{BenchHarness, BenchSamples};
     use stats::Stats;
-    use num;
-    use rand;
+
+    use core::num;
+    use core::rand;
+    use core::u64;
+    use core::vec;
 
     pub impl BenchHarness {
 
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs
index b711825aecf..7bd411315b2 100644
--- a/src/libstd/timer.rs
+++ b/src/libstd/timer.rs
@@ -221,7 +221,7 @@ mod test {
                 let ch = ch.clone();
                 let hl_loop_clone = hl_loop.clone();
                 do task::spawn {
-                    use rand::*;
+                    use core::rand::*;
                     let rng = Rng();
                     for iter::repeat(times) {
                         sleep(&hl_loop_clone, rng.next() as uint % maxms);
diff --git a/src/libstd/uv_global_loop.rs b/src/libstd/uv_global_loop.rs
index 52cfc078bac..1898ef77320 100644
--- a/src/libstd/uv_global_loop.rs
+++ b/src/libstd/uv_global_loop.rs
@@ -12,21 +12,20 @@
 
 use ll = uv_ll;
 use iotask = uv_iotask;
-use get_gl = get;
+use get_gl = self::get;
 use uv_iotask::{IoTask, spawn_iotask};
 
+use core::clone::Clone;
+use core::comm::{Port, Chan, SharedChan, select2i};
 use core::either::{Left, Right};
 use core::libc;
-use core::comm::{Port, Chan, SharedChan, select2i};
-use core::unstable::global::{global_data_clone_create,
-                            global_data_clone};
-use core::unstable::weak_task::weaken_task;
+use core::option::{Some, None};
 use core::str;
 use core::task::{task, SingleThreaded, spawn};
 use core::task;
+use core::unstable::global::{global_data_clone_create, global_data_clone};
+use core::unstable::weak_task::weaken_task;
 use core::vec;
-use core::clone::Clone;
-use core::option::{Some, None};
 
 /**
  * Race-free helper to get access to a global task where a libuv
@@ -123,7 +122,7 @@ fn spawn_loop() -> IoTask {
 mod test {
     use core::prelude::*;
 
-    use get_gl = get;
+    use get_gl = uv_global_loop::get;
     use uv::iotask;
     use uv::ll;
     use uv_global_loop::*;
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 592ac40e082..7f47db37504 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -396,7 +396,7 @@ fn unwrap<T:Owned + Encodable<json::Encoder> + Decodable<json::Decoder>>(
 
 //#[test]
 fn test() {
-    use io::WriterUtil;
+    use core::io::WriterUtil;
 
     let db = @Mut(Database { db_filename: Path("db.json"),
                              db_cache: LinearMap::new(),