Mark the panic macros as diagnostic items.
This commit is contained in:
parent
5b3b80a710
commit
462ee9c1b5
2 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[allow_internal_unstable(core_panic, const_caller_location)]
|
#[allow_internal_unstable(core_panic, const_caller_location)]
|
||||||
#[stable(feature = "core", since = "1.6.0")]
|
#[stable(feature = "core", since = "1.6.0")]
|
||||||
|
#[rustc_diagnostic_item = "core_panic_macro"]
|
||||||
macro_rules! panic {
|
macro_rules! panic {
|
||||||
() => (
|
() => (
|
||||||
$crate::panic!("explicit panic")
|
$crate::panic!("explicit panic")
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow_internal_unstable(libstd_sys_internals)]
|
#[allow_internal_unstable(libstd_sys_internals)]
|
||||||
|
#[rustc_diagnostic_item = "std_panic_macro"]
|
||||||
macro_rules! panic {
|
macro_rules! panic {
|
||||||
() => ({ $crate::panic!("explicit panic") });
|
() => ({ $crate::panic!("explicit panic") });
|
||||||
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });
|
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue