From 0d8340327c03f319b49cb91e2e64aa66dd1e76c7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 30 Jul 2015 08:53:22 -0700 Subject: 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. --- src/libstd/lib.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index a694a9280dc..7baa7558e52 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -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; -} -- cgit 1.4.1-3-g733a5