From 209c701bf9e95542aec69455bc12c7ca295109c4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 6 Jan 2015 11:07:09 -0800 Subject: std: Stablize the macros module This commit performs a pass over the `std::macros` module, applying stability attributes where necessary. In particular, this audits macros for patterns such as: * Standard use of forward-to-format-args via `$($arg:tt)*` (or `+`) * Prevent macro-defined identifiers from leaking into expression arguments as hygiene is not perfectly implemented. * Wherever possible, `$crate` is used now. Specifically, the following actions were taken: * The `std::macros` module itself is no longer public. * The `panic!` macro is stable * The `assert!` macro is stable * The `assert_eq!` macro is stable * The `debug_assert!` macro is stable * The `debug_assert_eq!` macro is stable * The `unreachable!` macro is stable after removing the extra forms to bring the definition in line with the `unimplemented!` macro. * The `try!` macro is stable * The `vec!` macro is stable [breaking-change] --- src/libstd/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index eef5bdb60ee..48c6fe4e402 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -120,8 +120,7 @@ extern crate log; #[macro_use] -#[macro_reexport(assert, assert_eq, debug_assert, debug_assert_eq, - unreachable, unimplemented, write, writeln)] +#[macro_reexport(write, writeln)] extern crate core; #[macro_use] @@ -176,7 +175,7 @@ pub use unicode::char; /* Exported macros */ #[macro_use] -pub mod macros; +mod macros; #[macro_use] pub mod bitflags; -- cgit 1.4.1-3-g733a5