diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-07-30 08:53:22 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-08-04 14:02:36 -0700 |
| commit | 0d8340327c03f319b49cb91e2e64aa66dd1e76c7 (patch) | |
| tree | 308af0af76da6c6a020ee5e8d9e5dbb40152307a /src/libstd/sys/unix/thread.rs | |
| parent | 5cccf3cd256420d9f32c265e83036dea1d5f94d8 (diff) | |
| download | rust-0d8340327c03f319b49cb91e2e64aa66dd1e76c7.tar.gz rust-0d8340327c03f319b49cb91e2e64aa66dd1e76c7.zip | |
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.
Diffstat (limited to 'src/libstd/sys/unix/thread.rs')
| -rw-r--r-- | src/libstd/sys/unix/thread.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 6be61f06926..67ecd4d9229 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -166,6 +166,7 @@ impl Drop for Thread { not(target_os = "netbsd"), not(target_os = "openbsd")))] pub mod guard { + #[cfg(stage0)] use prelude::v1::*; pub unsafe fn current() -> Option<usize> { None } |
