diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-07-29 14:14:01 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-07-29 14:18:24 -0700 |
| commit | 5af6cf9fa422cb492525e139752a57d2d89f42c7 (patch) | |
| tree | c87b65c8d879091a429f8b3e7b57b2dfa3956d99 /src/libstd/lib.rs | |
| parent | 523ee8d37cb3aed6bbad16760850fa94253c2072 (diff) | |
| download | rust-5af6cf9fa422cb492525e139752a57d2d89f42c7.tar.gz rust-5af6cf9fa422cb492525e139752a57d2d89f42c7.zip | |
std: Remove the curious inner module
This isn't actually necessary any more with the advent of `$crate` and changes in the compiler to expand macros to `::core::$foo` in the context of a `#![no_std]` crate. The libcore inner module was also trimmed down a bit to the bare bones.
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 3d3a46e61d5..9f582c28cfd 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -421,27 +421,10 @@ pub mod __rand { // because rustdoc only looks for these modules at the crate level. include!("primitive_docs.rs"); -// A curious inner-module that's not exported that contains the binding -// 'std' so that macro-expanded references to std::error and such -// can be resolved within libstd. -#[doc(hidden)] +// The expansion of --test has a few references to `::std::$foo` so this module +// is necessary to get things to compile. +#[cfg(test)] mod std { - pub use sync; // used for select!() - pub use error; // used for try!() - pub use fmt; // used for any formatting strings - pub use option; // used for thread_local!{} - pub use rt; // used for panic!() - pub use vec; // used for vec![] - pub use cell; // used for tls! - pub use thread; // used for thread_local! - pub use marker; // used for tls! - - // The test runner calls ::std::env::args() but really wants realstd - #[cfg(test)] pub use realstd::env as env; - // The test runner requires std::slice::Vector, so re-export std::slice just for it. - // - // It is also used in vec![] - pub use slice; - - pub use boxed; // used for vec![] + pub use option; + pub use realstd::env; } |
