@@ -523,28 +523,12 @@ impl FormatArgsExpn<'tcx> {
523523 if let ExpnKind :: Macro ( _, name) = expr. span. ctxt( ) . outer_expn_data( ) . kind;
524524 let name = name. as_str( ) ;
525525 if name. ends_with( "format_args" ) || name. ends_with( "format_args_nl" ) ;
526-
527- if let ExprKind :: Match ( inner_match, [ arm] , _) = expr. kind;
528-
529- // `match match`, if you will
530- if let ExprKind :: Match ( args, [ inner_arm] , _) = inner_match. kind;
531- if let ExprKind :: Tup ( value_args) = args. kind;
532- if let Some ( value_args) = value_args
533- . iter( )
534- . map( |e| match e. kind {
535- ExprKind :: AddrOf ( _, _, e) => Some ( e) ,
536- _ => None ,
537- } )
538- . collect( ) ;
539- if let ExprKind :: Array ( args) = inner_arm. body. kind;
540-
541- if let ExprKind :: Block ( Block { stmts: [ ] , expr: Some ( expr) , .. } , _) = arm. body. kind;
542- if let ExprKind :: Call ( _, call_args) = expr. kind;
543- if let Some ( ( strs_ref, fmt_expr) ) = match call_args {
526+ if let ExprKind :: Call ( _, args) = expr. kind;
527+ if let Some ( ( strs_ref, args, fmt_expr) ) = match args {
544528 // Arguments::new_v1
545- [ strs_ref, _ ] => Some ( ( strs_ref, None ) ) ,
529+ [ strs_ref, args ] => Some ( ( strs_ref, args , None ) ) ,
546530 // Arguments::new_v1_formatted
547- [ strs_ref, _ , fmt_expr] => Some ( ( strs_ref, Some ( fmt_expr) ) ) ,
531+ [ strs_ref, args , fmt_expr, _unsafe_arg ] => Some ( ( strs_ref, args , Some ( fmt_expr) ) ) ,
548532 _ => None ,
549533 } ;
550534 if let ExprKind :: AddrOf ( BorrowKind :: Ref , _, strs_arr) = strs_ref. kind;
@@ -560,6 +544,17 @@ impl FormatArgsExpn<'tcx> {
560544 None
561545 } )
562546 . collect( ) ;
547+ if let ExprKind :: AddrOf ( BorrowKind :: Ref , _, args) = args. kind;
548+ if let ExprKind :: Match ( args, [ arm] , _) = args. kind;
549+ if let ExprKind :: Tup ( value_args) = args. kind;
550+ if let Some ( value_args) = value_args
551+ . iter( )
552+ . map( |e| match e. kind {
553+ ExprKind :: AddrOf ( _, _, e) => Some ( e) ,
554+ _ => None ,
555+ } )
556+ . collect( ) ;
557+ if let ExprKind :: Array ( args) = arm. body. kind;
563558 then {
564559 Some ( FormatArgsExpn {
565560 format_string_span: strs_ref. span,
0 commit comments