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.
This commit is contained in:
Alex Crichton
2015-07-29 14:14:01 -07:00
parent 523ee8d37c
commit 5af6cf9fa4
9 changed files with 48 additions and 63 deletions

View File

@@ -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;
}