Skip to content

Commit a6301ca

Browse files
committed
Highlight is in the message for emphasis
1 parent 3109c93 commit a6301ca

File tree

1 file changed

+3
-4
lines changed
  • compiler/rustc_trait_selection/src/traits/error_reporting

1 file changed

+3
-4
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1766,12 +1766,11 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
17661766
if candidates.len() == 1 {
17671767
err.highlighted_help(vec![
17681768
(
1769-
format!(
1770-
"the trait `{}` is implemented for `",
1771-
candidates[0].print_only_trait_path()
1772-
),
1769+
format!("the trait `{}` ", candidates[0].print_only_trait_path()),
17731770
Style::NoStyle,
17741771
),
1772+
("is".to_string(), Style::Highlight),
1773+
(" implemented for `".to_string(), Style::NoStyle),
17751774
(candidates[0].self_ty().to_string(), Style::Highlight),
17761775
("`".to_string(), Style::NoStyle),
17771776
]);

0 commit comments

Comments
 (0)