Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 462ee9c

Browse files
committed
Mark the panic macros as diagnostic items.
1 parent 5b3b80a commit 462ee9c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/core/src/macros/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#[macro_export]
33
#[allow_internal_unstable(core_panic, const_caller_location)]
44
#[stable(feature = "core", since = "1.6.0")]
5+
#[rustc_diagnostic_item = "core_panic_macro"]
56
macro_rules! panic {
67
() => (
78
$crate::panic!("explicit panic")

library/std/src/macros.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#[macro_export]
99
#[stable(feature = "rust1", since = "1.0.0")]
1010
#[allow_internal_unstable(libstd_sys_internals)]
11+
#[rustc_diagnostic_item = "std_panic_macro"]
1112
macro_rules! panic {
1213
() => ({ $crate::panic!("explicit panic") });
1314
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });

0 commit comments

Comments
 (0)