Skip to content

Commit

Permalink
libstd: Remove unnecessary re-exports under std::std
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyball committed May 25, 2014
1 parent 759517c commit 69070ac
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/libstd/io/fs.rs
Expand Up @@ -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";
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/process.rs
Expand Up @@ -14,7 +14,7 @@

use prelude::*;

use std::str;
use str;
use fmt;
use io::IoResult;
use io;
Expand Down
25 changes: 11 additions & 14 deletions src/libstd/lib.rs
Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions src/libstd/os.rs
Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -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";

Expand Down

0 comments on commit 69070ac

Please sign in to comment.