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/thread/local.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd/thread') diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index a6ecd2d88d2..0615033736e 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -329,6 +329,7 @@ mod imp { // Due to rust-lang/rust#18804, make sure this is not generic! #[cfg(target_os = "linux")] unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) { + use prelude::v1::*; use mem; use libc; use sys_common::thread_local as os; -- cgit 1.4.1-3-g733a5