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:
Alex Crichton
2015-07-30 08:53:22 -07:00
parent 5cccf3cd25
commit 0d8340327c
7 changed files with 23 additions and 33 deletions

View File

@@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[cfg(stage0)]
use prelude::v1::*;
use alloc::boxed::FnBox;
@@ -87,6 +86,7 @@ impl Thread {
}
pub mod guard {
#[cfg(stage0)]
use prelude::v1::*;
pub unsafe fn current() -> Option<usize> { None }