@@ -39,6 +39,7 @@ macro_rules! panic {
3939#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4040#[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_eq_macro" ) ]
4141#[ allow_internal_unstable( panic_internals) ]
42+ #[ clippy:: format_args]
4243macro_rules! assert_eq {
4344 ( $left: expr, $right: expr $( , ) ?) => {
4445 match ( & $left, & $right) {
@@ -95,6 +96,7 @@ macro_rules! assert_eq {
9596#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
9697#[ cfg_attr( not( test) , rustc_diagnostic_item = "assert_ne_macro" ) ]
9798#[ allow_internal_unstable( panic_internals) ]
99+ #[ clippy:: format_args]
98100macro_rules! assert_ne {
99101 ( $left: expr, $right: expr $( , ) ?) => {
100102 match ( & $left, & $right) {
@@ -169,6 +171,7 @@ macro_rules! assert_ne {
169171#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
170172#[ allow_internal_unstable( panic_internals) ]
171173#[ rustc_macro_transparency = "semitransparent" ]
174+ #[ clippy:: format_args]
172175pub macro assert_matches {
173176 ( $left: expr, $( |) ? $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => {
174177 match $left {
@@ -392,6 +395,7 @@ pub macro cfg_match {
392395#[ stable ( feature = "rust1" , since = "1.0.0" ) ]
393396#[ rustc_diagnostic_item = "debug_assert_macro" ]
394397#[ allow_internal_unstable ( edition_panic) ]
398+ #[ clippy:: format_args]
395399macro_rules! debug_assert {
396400 ( $( $arg: tt) * ) => {
397401 if $crate :: cfg!( debug_assertions) {
@@ -422,6 +426,7 @@ macro_rules! debug_assert {
422426 #[ macro_export]
423427#[ stable( feature = "rust1" , since = "1.0.0" ) ]
424428#[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_eq_macro" ) ]
429+ #[ clippy:: format_args]
425430macro_rules! debug_assert_eq {
426431 ( $( $arg: tt) * ) => {
427432 if $crate :: cfg!( debug_assertions) {
@@ -452,6 +457,7 @@ macro_rules! debug_assert_eq {
452457 #[ macro_export]
453458#[ stable( feature = "assert_ne" , since = "1.13.0" ) ]
454459#[ cfg_attr( not( test) , rustc_diagnostic_item = "debug_assert_ne_macro" ) ]
460+ #[ clippy:: format_args]
455461macro_rules! debug_assert_ne {
456462 ( $( $arg: tt) * ) => {
457463 if $crate :: cfg!( debug_assertions) {
@@ -708,6 +714,7 @@ macro_rules! r#try {
708714 #[ macro_export]
709715#[ stable( feature = "rust1" , since = "1.0.0" ) ]
710716#[ cfg_attr( not( test) , rustc_diagnostic_item = "write_macro" ) ]
717+ #[ clippy:: format_args]
711718macro_rules! write {
712719 ( $dst: expr, $( $arg: tt) * ) => {
713720 $dst. write_fmt( $crate :: format_args!( $( $arg) * ) )
@@ -743,6 +750,7 @@ macro_rules! write {
743750#[ stable( feature = "rust1" , since = "1.0.0" ) ]
744751#[ cfg_attr( not( test) , rustc_diagnostic_item = "writeln_macro" ) ]
745752#[ allow_internal_unstable( format_args_nl) ]
753+ #[ clippy:: format_args]
746754macro_rules! writeln {
747755 ( $dst: expr $( , ) ?) => {
748756 $crate :: write!( $dst, "\n " )
@@ -895,6 +903,7 @@ macro_rules! unreachable {
895903#[ stable( feature = "rust1" , since = "1.0.0" ) ]
896904#[ cfg_attr( not( test) , rustc_diagnostic_item = "unimplemented_macro" ) ]
897905#[ allow_internal_unstable( panic_internals) ]
906+ #[ clippy:: format_args]
898907macro_rules! unimplemented {
899908 ( ) => {
900909 $crate :: panicking:: panic( "not implemented" )
@@ -975,6 +984,7 @@ macro_rules! unimplemented {
975984#[ stable( feature = "todo_macro" , since = "1.40.0" ) ]
976985#[ cfg_attr( not( test) , rustc_diagnostic_item = "todo_macro" ) ]
977986#[ allow_internal_unstable( panic_internals) ]
987+ #[ clippy:: format_args]
978988macro_rules! todo {
979989 ( ) => {
980990 $crate :: panicking:: panic( "not yet implemented" )
@@ -1090,6 +1100,7 @@ pub(crate) mod builtin {
10901100 #[ allow_internal_unstable( fmt_internals) ]
10911101 #[ rustc_builtin_macro]
10921102 #[ macro_export]
1103+ #[ clippy:: format_args]
10931104 macro_rules! format_args {
10941105 ( $fmt: expr) => { { /* compiler built-in */ } } ;
10951106 ( $fmt: expr, $( $args: tt) * ) => { { /* compiler built-in */ } } ;
@@ -1675,6 +1686,7 @@ pub(crate) mod builtin {
16751686 edition_panic,
16761687 generic_assert_internals
16771688 ) ]
1689+ #[ clippy:: format_args]
16781690 macro_rules! assert {
16791691 ( $cond: expr $( , ) ?) => { { /* compiler built-in */ } } ;
16801692 ( $cond: expr, $( $arg: tt) +) => { { /* compiler built-in */ } } ;
0 commit comments