about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-10-18 22:20:19 +0200
committerMara Bos <m-ou.se@m-ou.se>2020-10-18 22:20:19 +0200
commit462ee9c1b5eb0ae759e2fcc6f35dc5db4fc04367 (patch)
treec71e5e0bdb090f358cef5126c0857ddaed3858ea
parent5b3b80a710bb9462541fc77f671b64e2651f1ec1 (diff)
downloadrust-462ee9c1b5eb0ae759e2fcc6f35dc5db4fc04367.tar.gz
rust-462ee9c1b5eb0ae759e2fcc6f35dc5db4fc04367.zip
Mark the panic macros as diagnostic items.
-rw-r--r--library/core/src/macros/mod.rs1
-rw-r--r--library/std/src/macros.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index fe3eff04b4a..4999933fee5 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -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")
diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs
index 57649d6f8f2..d003dd9fe84 100644
--- a/library/std/src/macros.rs
+++ b/library/std/src/macros.rs
@@ -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) });