1
Fork 0

Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichton

Make `assert` a built-in procedural macro

Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).
This commit is contained in:
bors 2018-03-16 08:22:11 +00:00
commit 5f3996c3ec
8 changed files with 210 additions and 3 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]