about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 2e796004aab..a694a9280dc 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -213,7 +213,6 @@
 #![feature(core)]
 #![feature(core_float)]
 #![feature(core_intrinsics)]
-#![feature(core_prelude)]
 #![feature(core_simd)]
 #![feature(drain)]
 #![feature(fnbox)]
@@ -250,6 +249,7 @@
 #![cfg_attr(test, feature(float_from_str_radix, range_inclusive, float_extras, hash_default))]
 #![cfg_attr(test, feature(test, rustc_private, float_consts))]
 #![cfg_attr(target_env = "msvc", feature(link_args))]
+#![cfg_attr(stage0, feature(core, core_prelude))]
 
 // Don't link to std. We are std.
 #![no_std]
@@ -257,13 +257,17 @@
 #![allow(trivial_casts)]
 #![deny(missing_docs)]
 
+#[cfg(stage0)] #[macro_use] extern crate core;
+
 #[cfg(test)] extern crate test;
 #[cfg(test)] #[macro_use] extern crate log;
 
-#[macro_use]
+// We want to reexport a few macros from core but libcore has already been
+// imported by the compiler (via our #[no_std] attribute) In this case we just
+// add a new crate name so we can attach the reexports to it.
 #[macro_reexport(assert, assert_eq, debug_assert, debug_assert_eq,
     unreachable, unimplemented, write, writeln)]
-extern crate core;
+extern crate core as __core;
 
 #[macro_use]
 #[macro_reexport(vec, format)]