Fix bug with assert!() calling the wrong edition of panic!().

The span of `panic!` produced by the `assert` macro did not carry the
right edition. This changes `assert` to call the right version.
This commit is contained in:
Mara Bos 2021-02-01 23:08:22 +01:00
parent 5022ad0127
commit ed1de99b4f
2 changed files with 3 additions and 3 deletions

View file

@ -1234,7 +1234,7 @@ pub(crate) mod builtin {
#[rustc_builtin_macro]
#[macro_export]
#[rustc_diagnostic_item = "assert_macro"]
#[allow_internal_unstable(core_panic)]
#[allow_internal_unstable(core_panic, edition_panic)]
macro_rules! assert {
($cond:expr $(,)?) => {{ /* compiler built-in */ }};
($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }};