1
Fork 0

Mark the panic macros as diagnostic items.

This commit is contained in:
Mara Bos 2020-10-18 22:20:19 +02:00
parent 5b3b80a710
commit 462ee9c1b5
2 changed files with 2 additions and 0 deletions

View file

@ -2,6 +2,7 @@
#[macro_export]
#[allow_internal_unstable(core_panic, const_caller_location)]
#[stable(feature = "core", since = "1.6.0")]
#[rustc_diagnostic_item = "core_panic_macro"]
macro_rules! panic {
() => (
$crate::panic!("explicit panic")

View file

@ -8,6 +8,7 @@
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(libstd_sys_internals)]
#[rustc_diagnostic_item = "std_panic_macro"]
macro_rules! panic {
() => ({ $crate::panic!("explicit panic") });
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });