@@ -39,6 +39,7 @@ macro_rules! panic {
39
39
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
40
40
#[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_eq_macro" ) ]
41
41
#[ allow_internal_unstable( panic_internals) ]
42
+ #[ clippy:: format_args]
42
43
macro_rules! assert_eq {
43
44
( $left: expr, $right: expr $( , ) ?) => {
44
45
match ( & $left, & $right) {
@@ -95,6 +96,7 @@ macro_rules! assert_eq {
95
96
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
96
97
#[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_ne_macro" ) ]
97
98
#[ allow_internal_unstable( panic_internals) ]
99
+ #[ clippy:: format_args]
98
100
macro_rules! assert_ne {
99
101
( $left: expr, $right: expr $( , ) ?) => {
100
102
match ( & $left, & $right) {
@@ -169,6 +171,7 @@ macro_rules! assert_ne {
169
171
#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
170
172
#[ allow_internal_unstable( panic_internals) ]
171
173
#[ rustc_macro_transparency = "semitransparent" ]
174
+ #[ clippy:: format_args]
172
175
pub macro assert_matches {
173
176
( $left: expr, $( |) ? $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => {
174
177
match $left {
@@ -392,6 +395,7 @@ pub macro cfg_match {
392
395
#[ stable ( feature = "rust1" , since = "1.0.0" ) ]
393
396
#[ rustc_diagnostic_item = "debug_assert_macro" ]
394
397
#[ allow_internal_unstable ( edition_panic) ]
398
+ #[ clippy:: format_args]
395
399
macro_rules! debug_assert {
396
400
( $( $arg: tt) * ) => {
397
401
if $crate :: cfg!( debug_assertions) {
@@ -422,6 +426,7 @@ macro_rules! debug_assert {
422
426
#[ macro_export]
423
427
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
424
428
#[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_eq_macro" ) ]
429
+ #[ clippy:: format_args]
425
430
macro_rules! debug_assert_eq {
426
431
( $( $arg: tt) * ) => {
427
432
if $crate :: cfg!( debug_assertions) {
@@ -452,6 +457,7 @@ macro_rules! debug_assert_eq {
452
457
#[ macro_export]
453
458
#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
454
459
#[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_ne_macro" ) ]
460
+ #[ clippy:: format_args]
455
461
macro_rules! debug_assert_ne {
456
462
( $( $arg: tt) * ) => {
457
463
if $crate :: cfg!( debug_assertions) {
@@ -708,6 +714,7 @@ macro_rules! r#try {
708
714
#[ macro_export]
709
715
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
710
716
#[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" ) ]
717
+ #[ clippy:: format_args]
711
718
macro_rules! write {
712
719
( $dst: expr, $( $arg: tt) * ) => {
713
720
$dst. write_fmt( $crate :: format_args!( $( $arg) * ) )
@@ -743,6 +750,7 @@ macro_rules! write {
743
750
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
744
751
#[ cfg_attr( not( test) , rustc_diagnostic_item = "writeln_macro" ) ]
745
752
#[ allow_internal_unstable( format_args_nl) ]
753
+ #[ clippy:: format_args]
746
754
macro_rules! writeln {
747
755
( $dst: expr $( , ) ?) => {
748
756
$crate :: write!( $dst, "\n " )
@@ -895,6 +903,7 @@ macro_rules! unreachable {
895
903
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
896
904
#[ cfg_attr( not( test) , rustc_diagnostic_item = "unimplemented_macro" ) ]
897
905
#[ allow_internal_unstable( panic_internals) ]
906
+ #[ clippy:: format_args]
898
907
macro_rules! unimplemented {
899
908
( ) => {
900
909
$crate :: panicking:: panic( "not implemented" )
@@ -975,6 +984,7 @@ macro_rules! unimplemented {
975
984
#[ stable( feature = "todo_macro" , since = "1.40.0" ) ]
976
985
#[ cfg_attr( not( test) , rustc_diagnostic_item = "todo_macro" ) ]
977
986
#[ allow_internal_unstable( panic_internals) ]
987
+ #[ clippy:: format_args]
978
988
macro_rules! todo {
979
989
( ) => {
980
990
$crate :: panicking:: panic( "not yet implemented" )
@@ -1090,6 +1100,7 @@ pub(crate) mod builtin {
1090
1100
#[ allow_internal_unstable( fmt_internals) ]
1091
1101
#[ rustc_builtin_macro]
1092
1102
#[ macro_export]
1103
+ #[ clippy:: format_args]
1093
1104
macro_rules! format_args {
1094
1105
( $fmt: expr) => { { /* compiler built-in */ } } ;
1095
1106
( $fmt: expr, $( $args: tt) * ) => { { /* compiler built-in */ } } ;
@@ -1675,6 +1686,7 @@ pub(crate) mod builtin {
1675
1686
edition_panic,
1676
1687
generic_assert_internals
1677
1688
) ]
1689
+ #[ clippy:: format_args]
1678
1690
macro_rules! assert {
1679
1691
( $cond: expr $( , ) ?) => { { /* compiler built-in */ } } ;
1680
1692
( $cond: expr, $( $arg: tt) +) => { { /* compiler built-in */ } } ;
0 commit comments