@@ -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
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_eq_macro" , clippy :: format_args ) ]
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
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_ne_macro" , clippy :: format_args ) ]
97
97
#[ allow_internal_unstable( panic_internals) ]
98
98
macro_rules! assert_ne {
99
99
( $left: expr, $right: expr $( , ) ?) => {
@@ -169,6 +169,7 @@ macro_rules! assert_ne {
169
169
#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
170
170
#[ allow_internal_unstable( panic_internals) ]
171
171
#[ rustc_macro_transparency = "semitransparent" ]
172
+ #[ cfg_attr( not( test) , clippy:: format_args) ]
172
173
pub macro assert_matches {
173
174
( $left: expr, $( |) ? $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => {
174
175
match $left {
@@ -392,6 +393,7 @@ pub macro cfg_match {
392
393
#[ stable ( feature = "rust1" , since = "1.0.0" ) ]
393
394
#[ rustc_diagnostic_item = "debug_assert_macro" ]
394
395
#[ allow_internal_unstable ( edition_panic) ]
396
+ #[ cfg_attr ( not ( test) , clippy:: format_args) ]
395
397
macro_rules! debug_assert {
396
398
( $( $arg: tt) * ) => {
397
399
if $crate :: cfg!( debug_assertions) {
@@ -421,7 +423,7 @@ macro_rules! debug_assert {
421
423
/// ```
422
424
#[ macro_export]
423
425
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
424
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_eq_macro" ) ]
426
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_eq_macro" , clippy :: format_args ) ]
425
427
macro_rules! debug_assert_eq {
426
428
( $( $arg: tt) * ) => {
427
429
if $crate :: cfg!( debug_assertions) {
@@ -451,7 +453,7 @@ macro_rules! debug_assert_eq {
451
453
/// ```
452
454
#[ macro_export]
453
455
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
454
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_ne_macro" ) ]
456
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_ne_macro" , clippy :: format_args ) ]
455
457
macro_rules! debug_assert_ne {
456
458
( $( $arg: tt) * ) => {
457
459
if $crate :: cfg!( debug_assertions) {
@@ -707,7 +709,7 @@ macro_rules! r#try {
707
709
/// ```
708
710
#[ macro_export]
709
711
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
710
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" ) ]
712
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" , clippy :: format_args ) ]
711
713
macro_rules! write {
712
714
( $dst: expr, $( $arg: tt) * ) => {
713
715
$dst. write_fmt( $crate :: format_args!( $( $arg) * ) )
@@ -741,7 +743,7 @@ macro_rules! write {
741
743
/// ```
742
744
#[ macro_export]
743
745
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
744
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "writeln_macro" ) ]
746
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "writeln_macro" , clippy :: format_args ) ]
745
747
#[ allow_internal_unstable( format_args_nl) ]
746
748
macro_rules! writeln {
747
749
( $dst: expr $( , ) ?) => {
@@ -895,6 +897,7 @@ macro_rules! unreachable {
895
897
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
896
898
#[ cfg_attr( not( test) , rustc_diagnostic_item = "unimplemented_macro" ) ]
897
899
#[ allow_internal_unstable( panic_internals) ]
900
+ #[ clippy:: format_args]
898
901
macro_rules! unimplemented {
899
902
( ) => {
900
903
$crate :: panicking:: panic( "not implemented" )
@@ -973,7 +976,7 @@ macro_rules! unimplemented {
973
976
/// ```
974
977
#[ macro_export]
975
978
#[ stable( feature = "todo_macro" , since = "1.40.0" ) ]
976
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "todo_macro" ) ]
979
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "todo_macro" , clippy :: format_args ) ]
977
980
#[ allow_internal_unstable( panic_internals) ]
978
981
macro_rules! todo {
979
982
( ) => {
@@ -1085,7 +1088,7 @@ pub(crate) mod builtin {
1085
1088
/// and cannot be stored for later use.
1086
1089
/// This is a known limitation, see [#92698](https://github.com/rust-lang/rust/issues/92698).
1087
1090
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1088
- #[ cfg_attr( not( test) , rustc_diagnostic_item = "format_args_macro" ) ]
1091
+ #[ cfg_attr( not( test) , rustc_diagnostic_item = "format_args_macro" , clippy :: format_args ) ]
1089
1092
#[ allow_internal_unsafe]
1090
1093
#[ allow_internal_unstable( fmt_internals) ]
1091
1094
#[ rustc_builtin_macro]
@@ -1675,6 +1678,7 @@ pub(crate) mod builtin {
1675
1678
edition_panic,
1676
1679
generic_assert_internals
1677
1680
) ]
1681
+ #[ cfg_attr( not( test) , clippy:: format_args) ]
1678
1682
macro_rules! assert {
1679
1683
( $cond: expr $( , ) ?) => { { /* compiler built-in */ } } ;
1680
1684
( $cond: expr, $( $arg: tt) +) => { { /* compiler built-in */ } } ;
0 commit comments