1
Fork 0

Make assert macro a built-in procedural macro

This commit is contained in:
Shotaro Yamada 2018-03-07 16:13:15 +09:00
parent 6f2100b92c
commit 517083fbad
5 changed files with 137 additions and 1 deletions

View file

@ -355,8 +355,9 @@ use prelude::v1::*;
// 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, assert_eq, assert_ne, debug_assert, debug_assert_eq,
#[macro_reexport(assert_eq, assert_ne, debug_assert, debug_assert_eq,
debug_assert_ne, unreachable, unimplemented, write, writeln, try)]
#[cfg_attr(stage0, macro_reexport(assert))]
extern crate core as __core;
#[macro_use]