@@ -37,7 +37,7 @@ macro_rules! panic {
37
37
/// ```
38
38
#[ macro_export]
39
39
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
40
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "assert_eq_macro" ) ]
40
+ #[ rustc_diagnostic_item = "assert_eq_macro" ]
41
41
#[ allow_internal_unstable( panic_internals) ]
42
42
macro_rules! assert_eq {
43
43
( $left: expr, $right: expr $( , ) ?) => {
@@ -93,7 +93,7 @@ macro_rules! assert_eq {
93
93
/// ```
94
94
#[ macro_export]
95
95
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
96
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "assert_ne_macro" ) ]
96
+ #[ rustc_diagnostic_item = "assert_ne_macro" ]
97
97
#[ allow_internal_unstable( panic_internals) ]
98
98
macro_rules! assert_ne {
99
99
( $left: expr, $right: expr $( , ) ?) => {
@@ -331,7 +331,7 @@ macro_rules! debug_assert {
331
331
/// ```
332
332
#[ macro_export]
333
333
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
334
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "debug_assert_eq_macro" ) ]
334
+ #[ rustc_diagnostic_item = "debug_assert_eq_macro" ]
335
335
macro_rules! debug_assert_eq {
336
336
( $( $arg: tt) * ) => {
337
337
if $crate :: cfg!( debug_assertions) {
@@ -361,7 +361,7 @@ macro_rules! debug_assert_eq {
361
361
/// ```
362
362
#[ macro_export]
363
363
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
364
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "debug_assert_ne_macro" ) ]
364
+ #[ rustc_diagnostic_item = "debug_assert_ne_macro" ]
365
365
macro_rules! debug_assert_ne {
366
366
( $( $arg: tt) * ) => {
367
367
if $crate :: cfg!( debug_assertions) {
@@ -442,7 +442,7 @@ pub macro debug_assert_matches($($arg:tt)*) {
442
442
/// ```
443
443
#[ macro_export]
444
444
#[ stable( feature = "matches_macro" , since = "1.42.0" ) ]
445
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "matches_macro" ) ]
445
+ #[ rustc_diagnostic_item = "matches_macro" ]
446
446
macro_rules! matches {
447
447
( $expression: expr, $pattern: pat $( if $guard: expr) ? $( , ) ?) => {
448
448
match $expression {
@@ -617,7 +617,7 @@ macro_rules! r#try {
617
617
/// ```
618
618
#[ macro_export]
619
619
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
620
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "write_macro" ) ]
620
+ #[ rustc_diagnostic_item = "write_macro" ]
621
621
macro_rules! write {
622
622
( $dst: expr, $( $arg: tt) * ) => {
623
623
$dst. write_fmt( $crate :: format_args!( $( $arg) * ) )
@@ -651,7 +651,7 @@ macro_rules! write {
651
651
/// ```
652
652
#[ macro_export]
653
653
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
654
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "writeln_macro" ) ]
654
+ #[ rustc_diagnostic_item = "writeln_macro" ]
655
655
#[ allow_internal_unstable( format_args_nl) ]
656
656
macro_rules! writeln {
657
657
( $dst: expr $( , ) ?) => {
@@ -718,7 +718,7 @@ macro_rules! writeln {
718
718
#[ rustc_builtin_macro( unreachable) ]
719
719
#[ allow_internal_unstable( edition_panic) ]
720
720
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
721
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "unreachable_macro" ) ]
721
+ #[ rustc_diagnostic_item = "unreachable_macro" ]
722
722
macro_rules! unreachable {
723
723
// Expands to either `$crate::panic::unreachable_2015` or `$crate::panic::unreachable_2021`
724
724
// depending on the edition of the caller.
@@ -803,7 +803,7 @@ macro_rules! unreachable {
803
803
/// ```
804
804
#[ macro_export]
805
805
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
806
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "unimplemented_macro" ) ]
806
+ #[ rustc_diagnostic_item = "unimplemented_macro" ]
807
807
#[ allow_internal_unstable( panic_internals) ]
808
808
macro_rules! unimplemented {
809
809
( ) => {
@@ -883,7 +883,7 @@ macro_rules! unimplemented {
883
883
/// ```
884
884
#[ macro_export]
885
885
#[ stable( feature = "todo_macro" , since = "1.40.0" ) ]
886
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "todo_macro" ) ]
886
+ #[ rustc_diagnostic_item = "todo_macro" ]
887
887
#[ allow_internal_unstable( panic_internals) ]
888
888
macro_rules! todo {
889
889
( ) => {
@@ -995,7 +995,7 @@ pub(crate) mod builtin {
995
995
/// and cannot be stored for later use.
996
996
/// This is a known limitation, see [#92698](https://github.com/rust-lang/rust/issues/92698).
997
997
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
998
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "format_args_macro" ) ]
998
+ #[ rustc_diagnostic_item = "format_args_macro" ]
999
999
#[ allow_internal_unsafe]
1000
1000
#[ allow_internal_unstable( fmt_internals) ]
1001
1001
#[ rustc_builtin_macro]
@@ -1342,7 +1342,7 @@ pub(crate) mod builtin {
1342
1342
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1343
1343
#[ rustc_builtin_macro]
1344
1344
#[ macro_export]
1345
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "include_str_macro" ) ]
1345
+ #[ rustc_diagnostic_item = "include_str_macro" ]
1346
1346
macro_rules! include_str {
1347
1347
( $file: expr $( , ) ?) => { { /* compiler built-in */ } } ;
1348
1348
}
@@ -1382,7 +1382,7 @@ pub(crate) mod builtin {
1382
1382
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1383
1383
#[ rustc_builtin_macro]
1384
1384
#[ macro_export]
1385
- #[ cfg_attr ( not ( test ) , rustc_diagnostic_item = "include_bytes_macro" ) ]
1385
+ #[ rustc_diagnostic_item = "include_bytes_macro" ]
1386
1386
macro_rules! include_bytes {
1387
1387
( $file: expr $( , ) ?) => { { /* compiler built-in */ } } ;
1388
1388
}
0 commit comments