@@ -657,10 +657,9 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
657657
658658 let num_redundant_lt_args = lt_arg_spans. len ( ) - self . num_expected_lifetime_args ( ) ;
659659 let msg_lifetimes = format ! (
660- "remove {} {} argument{}" ,
661- if num_redundant_lt_args == 1 { "this" } else { "these" } ,
662- "lifetime" ,
663- pluralize!( num_redundant_lt_args) ,
660+ "remove {these} lifetime argument{s}" ,
661+ these = pluralize!( "this" , num_redundant_lt_args) ,
662+ s = pluralize!( num_redundant_lt_args) ,
664663 ) ;
665664
666665 err. span_suggestion (
@@ -700,10 +699,9 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
700699 let num_redundant_gen_args =
701700 gen_arg_spans. len ( ) - self . num_expected_type_or_const_args ( ) ;
702701 let msg_types_or_consts = format ! (
703- "remove {} {} argument{}" ,
704- if num_redundant_gen_args == 1 { "this" } else { "these" } ,
705- "generic" ,
706- pluralize!( num_redundant_type_or_const_args) ,
702+ "remove {these} generic argument{s}" ,
703+ these = pluralize!( "this" , num_redundant_gen_args) ,
704+ s = pluralize!( num_redundant_gen_args) ,
707705 ) ;
708706
709707 err. span_suggestion (
0 commit comments