Skip to content

Commit dd262e3

Browse files
committed
Add cfg(not(bootstrap)) on the new rustc_diagnostic_item attributes.
The beta compiler doesn't accept rustc_diagnostic_items on macros yet.
1 parent 14dcf0a commit dd262e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/core/src/macros/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +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"]
5+
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "core_panic_macro")]
66
macro_rules! panic {
77
() => (
88
$crate::panic!("explicit panic")
@@ -1216,7 +1216,7 @@ pub(crate) mod builtin {
12161216
#[stable(feature = "rust1", since = "1.0.0")]
12171217
#[rustc_builtin_macro]
12181218
#[macro_export]
1219-
#[rustc_diagnostic_item = "assert_macro"]
1219+
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "assert_macro")]
12201220
#[allow_internal_unstable(core_panic)]
12211221
macro_rules! assert {
12221222
($cond:expr $(,)?) => {{ /* compiler built-in */ }};

library/std/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +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"]
11+
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "std_panic_macro")]
1212
macro_rules! panic {
1313
() => ({ $crate::panic!("explicit panic") });
1414
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });

0 commit comments

Comments
 (0)