about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-01 21:22:49 +0000
committerbors <bors@rust-lang.org>2018-05-01 21:22:49 +0000
commit96b09e02127d2bab4122d220845eee5b91d7d934 (patch)
tree1e9a73f3a557041a2173ed39cc3325768bd6f914 /src/libstd
parent1fd74ebc28176b12a871cb132b8bc5a1f36a18dc (diff)
parent730c7222ee85bbea677f08447ca83bf539a1bdf8 (diff)
downloadrust-96b09e02127d2bab4122d220845eee5b91d7d934.tar.gz
rust-96b09e02127d2bab4122d220845eee5b91d7d934.zip
Auto merge of #49982 - petrochenkov:noreex, r=alexcrichton
Remove unstable `macro_reexport`

It's subsumed by `feature(use_extern_macros)` and `pub use`

cc https://github.com/rust-lang/rust/issues/35896
closes https://github.com/rust-lang/rust/issues/29638
closes https://github.com/rust-lang/rust/issues/38951
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 41992193135..fc05833e285 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -273,7 +273,6 @@
 #![feature(libc)]
 #![feature(link_args)]
 #![feature(linkage)]
-#![feature(macro_reexport)]
 #![feature(macro_vis_matcher)]
 #![feature(needs_panic_runtime)]
 #![feature(never_type)]
@@ -313,6 +312,7 @@
 #![feature(unboxed_closures)]
 #![feature(untagged_unions)]
 #![feature(unwind_attributes)]
+#![feature(use_extern_macros)]
 #![feature(vec_push_all)]
 #![feature(doc_cfg)]
 #![feature(doc_masked)]
@@ -347,15 +347,14 @@ use prelude::v1::*;
 #[cfg(test)] extern crate test;
 #[cfg(test)] extern crate rand;
 
-// We want to re-export 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 re-exports to it.
-#[macro_reexport(assert_eq, assert_ne, debug_assert, debug_assert_eq,
-                 debug_assert_ne, unreachable, unimplemented, write, writeln, try)]
-extern crate core as __core;
+// Re-export a few macros from core
+#[stable(feature = "rust1", since = "1.0.0")]
+pub use core::{assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne};
+#[stable(feature = "rust1", since = "1.0.0")]
+pub use core::{unreachable, unimplemented, write, writeln, try};
 
+#[allow(unused_imports)] // macros from `alloc` are not used on all platforms
 #[macro_use]
-#[macro_reexport(vec, format)]
 extern crate alloc as alloc_crate;
 extern crate alloc_system;
 #[doc(masked)]
@@ -450,6 +449,8 @@ pub use alloc_crate::borrow;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use alloc_crate::fmt;
 #[stable(feature = "rust1", since = "1.0.0")]
+pub use alloc_crate::format;
+#[stable(feature = "rust1", since = "1.0.0")]
 pub use alloc_crate::slice;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use alloc_crate::str;