@@ -361,10 +361,10 @@ pub fn suggest_constraining_type_params<'a>(
361361 trait_names. dedup ( ) ;
362362 let n = trait_names. len ( ) ;
363363 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( ", " ) ) ,
368368 [ ] => return false ,
369369 } , )
370370 } else {
@@ -531,7 +531,7 @@ pub fn suggest_constraining_type_params<'a>(
531531 let ( span, post, suggestion, msg) = suggestions. pop ( ) . unwrap ( ) ;
532532 let msg = match msg {
533533 SuggestChangingConstraintsMessage :: RestrictBoundFurther => {
534- format ! ( "consider further restricting this bound with {post} " )
534+ format ! ( "consider further restricting this bound" )
535535 }
536536 SuggestChangingConstraintsMessage :: RestrictTypeFurther { ty }
537537 | SuggestChangingConstraintsMessage :: RestrictType { ty }
0 commit comments