diff options
| author | Kevin Ballard <kevin@sb.org> | 2014-05-25 16:21:07 -0700 |
|---|---|---|
| committer | Kevin Ballard <kevin@sb.org> | 2014-05-25 16:21:07 -0700 |
| commit | 69070ac85fcf930b02e2c75bc161a75c5742e138 (patch) | |
| tree | f684618920bdfc2429fdb7061d1f67b8f3ab6697 /src | |
| parent | 759517c180857e1b494486d810c882755a1e2e26 (diff) | |
| download | rust-69070ac85fcf930b02e2c75bc161a75c5742e138.tar.gz rust-69070ac85fcf930b02e2c75bc161a75c5742e138.zip | |
libstd: Remove unnecessary re-exports under std::std
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/io/fs.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 25 | ||||
| -rw-r--r-- | src/libstd/os.rs | 10 |
4 files changed, 19 insertions, 22 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index d8edd6517d5..d3e250be9a3 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -859,7 +859,7 @@ mod test { }) iotest!(fn file_test_io_seek_shakedown() { - use std::str; // 01234567890123 + use str; // 01234567890123 let initial_msg = "qwer-asdf-zxcv"; let chunk_one: &str = "qwer"; let chunk_two: &str = "asdf"; @@ -947,7 +947,7 @@ mod test { }) iotest!(fn file_test_directoryinfo_readdir() { - use std::str; + use str; let tmpdir = tmpdir(); let dir = &tmpdir.join("di_readdir"); check!(mkdir(dir, io::UserRWX)); diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 468bf5551b3..7eb495a6f68 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -14,7 +14,7 @@ use prelude::*; -use std::str; +use str; use fmt; use io::IoResult; use io; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 0d42e1743f5..1d2758c62a0 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -266,24 +266,21 @@ pub mod rt; // can be resolved within libstd. #[doc(hidden)] mod std { + // mods used for deriving pub use clone; pub use cmp; - pub use comm; - pub use fmt; pub use hash; - pub use io; - pub use kinds; - pub use local_data; - pub use option; - pub use os; - pub use rt; - pub use str; - pub use to_str; - pub use ty; - pub use unstable; - pub use vec; + pub use comm; // used for select!() + pub use fmt; // used for any formatting strings + pub use io; // used for println!() + pub use local_data; // used for local_data_key!() + pub use option; // used for bitflags!() + pub use rt; // used for fail!() + pub use vec; // used for vec![] + + // The test runner calls ::std::os::args() but really wants realstd + #[cfg(test)] pub use os = realstd::os; // The test runner requires std::slice::Vector, so re-export std::slice just for it. #[cfg(test)] pub use slice; - #[cfg(test)] pub use string; } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 00e5574c86d..415cc69f321 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1328,7 +1328,7 @@ impl Drop for MemoryMap { #[cfg(target_os = "linux")] pub mod consts { - pub use std::os::arch_consts::ARCH; + pub use os::arch_consts::ARCH; pub static FAMILY: &'static str = "unix"; @@ -1359,7 +1359,7 @@ pub mod consts { #[cfg(target_os = "macos")] pub mod consts { - pub use std::os::arch_consts::ARCH; + pub use os::arch_consts::ARCH; pub static FAMILY: &'static str = "unix"; @@ -1390,7 +1390,7 @@ pub mod consts { #[cfg(target_os = "freebsd")] pub mod consts { - pub use std::os::arch_consts::ARCH; + pub use os::arch_consts::ARCH; pub static FAMILY: &'static str = "unix"; @@ -1421,7 +1421,7 @@ pub mod consts { #[cfg(target_os = "android")] pub mod consts { - pub use std::os::arch_consts::ARCH; + pub use os::arch_consts::ARCH; pub static FAMILY: &'static str = "unix"; @@ -1452,7 +1452,7 @@ pub mod consts { #[cfg(target_os = "win32")] pub mod consts { - pub use std::os::arch_consts::ARCH; + pub use os::arch_consts::ARCH; pub static FAMILY: &'static str = "windows"; |
