Skip to content

Commit e756425

Browse files
committed
Add help about using cargo tree
1 parent 7340903 commit e756425

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -2039,10 +2039,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
20392039
let mut span: MultiSpan = vec![sp_candidate, sp_found].into();
20402040
span.push_span_label(self.tcx.def_span(trait_def_id), "this is the required trait");
20412041
span.push_span_label(sp_candidate, "this type implements the required trait");
2042-
span.push_span_label(
2043-
sp_found,
2044-
"this type doesn't implement the required trait",
2045-
);
2042+
span.push_span_label(sp_found, "this type doesn't implement the required trait");
20462043
err.highlighted_span_note(
20472044
span,
20482045
vec![
@@ -2055,6 +2052,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
20552052
],
20562053
);
20572054
}
2055+
err.help("you can use `cargo tree` to explore your dependency tree");
20582056
return true;
20592057
}
20602058

tests/ui/crate-loading/multiple-dep-versions.svg

+13-11
Loading

0 commit comments

Comments
 (0)