@@ -657,10 +657,9 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
657
657
658
658
let num_redundant_lt_args = lt_arg_spans. len ( ) - self . num_expected_lifetime_args ( ) ;
659
659
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) ,
664
663
) ;
665
664
666
665
err. span_suggestion (
@@ -700,10 +699,9 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
700
699
let num_redundant_gen_args =
701
700
gen_arg_spans. len ( ) - self . num_expected_type_or_const_args ( ) ;
702
701
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) ,
707
705
) ;
708
706
709
707
err. span_suggestion (
0 commit comments