This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -720,7 +720,6 @@ fn report_redundant_format_arguments(
720720 let mut fmt_arg_indices = vec ! [ ] ;
721721 let mut args_spans = vec ! [ ] ;
722722 let mut fmt_spans = vec ! [ ] ;
723- let mut bindings = vec ! [ ] ;
724723
725724 for ( i, unnamed_arg) in args. unnamed_args ( ) . iter ( ) . enumerate ( ) . rev ( ) {
726725 let Some ( ty) = unnamed_arg. expr . to_ty ( ) else { continue } ;
@@ -734,17 +733,17 @@ fn report_redundant_format_arguments(
734733 let matching_placeholders = placeholders
735734 . iter ( )
736735 . filter ( |( _, inline_binding) | argument_binding == * inline_binding)
736+ . map ( |( span, _) | span)
737737 . collect :: < Vec < _ > > ( ) ;
738738
739739 if !matching_placeholders. is_empty ( ) {
740740 fmt_arg_indices. push ( i) ;
741741 args_spans. push ( unnamed_arg. expr . span ) ;
742- for ( span, binding ) in & matching_placeholders {
743- if fmt_spans. contains ( span) {
742+ for span in & matching_placeholders {
743+ if fmt_spans. contains ( * span) {
744744 continue ;
745745 }
746- fmt_spans. push ( * span) ;
747- bindings. push ( binding) ;
746+ fmt_spans. push ( * * span) ;
748747 }
749748 }
750749 }
You can’t perform that action at this time.
0 commit comments