diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 88a4b6ee06d3a..de35f545f06c5 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -1766,12 +1766,11 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> { if candidates.len() == 1 { err.highlighted_help(vec![ ( - format!( - "the trait `{}` is implemented for `", - candidates[0].print_only_trait_path() - ), + format!("the trait `{}` ", candidates[0].print_only_trait_path()), Style::NoStyle, ), + ("is".to_string(), Style::Highlight), + (" implemented for `".to_string(), Style::NoStyle), (candidates[0].self_ty().to_string(), Style::Highlight), ("`".to_string(), Style::NoStyle), ]);