syntax: Don't assume std exists for tests
This commit removes the injection of `std::env::args()` from `--test` expanded code, relying on the test runner itself to call this funciton. This is more hygienic because we can't assume that `std` exists at the top layer all the time, and it meaks the injected test module entirely self contained.
This commit is contained in:
@@ -414,11 +414,3 @@ pub mod __rand {
|
||||
// the rustdoc documentation for primitive types. Using `include!`
|
||||
// because rustdoc only looks for these modules at the crate level.
|
||||
include!("primitive_docs.rs");
|
||||
|
||||
// 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 option;
|
||||
pub use realstd::env;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user