@@ -361,10 +361,10 @@ pub fn suggest_constraining_type_params<'a>(
361
361
trait_names. dedup ( ) ;
362
362
let n = trait_names. len ( ) ;
363
363
let stable = if all_stable { "" } else { "unstable " } ;
364
- let trait_ = if all_known { "trait" } else { "" } ;
365
- format ! ( "{stable}{trait_}{} {}" , pluralize! ( n ) , match & trait_names[ ..] {
366
- [ t] => t . to_string ( ) ,
367
- [ ts @ .., last] => format!( "{} and {last}" , ts. join( ", " ) ) ,
364
+ let trait_ = if all_known { format ! ( "trait{}" , pluralize! ( n ) ) } else { String :: new ( ) } ;
365
+ format ! ( "{stable}{trait_}{}" , match & trait_names[ ..] {
366
+ [ t] => format! ( " {t}" ) ,
367
+ [ ts @ .., last] => format!( " {} and {last}" , ts. join( ", " ) ) ,
368
368
[ ] => return false ,
369
369
} , )
370
370
} else {
@@ -531,7 +531,7 @@ pub fn suggest_constraining_type_params<'a>(
531
531
let ( span, post, suggestion, msg) = suggestions. pop ( ) . unwrap ( ) ;
532
532
let msg = match msg {
533
533
SuggestChangingConstraintsMessage :: RestrictBoundFurther => {
534
- format ! ( "consider further restricting this bound with {post} " )
534
+ format ! ( "consider further restricting this bound" )
535
535
}
536
536
SuggestChangingConstraintsMessage :: RestrictTypeFurther { ty }
537
537
| SuggestChangingConstraintsMessage :: RestrictType { ty }
0 commit comments