Skip to content

Commit 727e99e

Browse files
committed
Add help about using cargo tree
1 parent 2c3872a commit 727e99e

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -1723,10 +1723,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
17231723
let mut span: MultiSpan = vec![sp_candidate, sp_found].into();
17241724
span.push_span_label(self.tcx.def_span(trait_def_id), "this is the required trait");
17251725
span.push_span_label(sp_candidate, "this type implements the required trait");
1726-
span.push_span_label(
1727-
sp_found,
1728-
"this type doesn't implement the required trait",
1729-
);
1726+
span.push_span_label(sp_found, "this type doesn't implement the required trait");
17301727
err.highlighted_span_note(
17311728
span,
17321729
vec![
@@ -1739,6 +1736,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
17391736
],
17401737
);
17411738
}
1739+
err.help("you can use `cargo tree` to explore your dependency tree");
17421740
return true;
17431741
}
17441742

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

+13-11
Loading

0 commit comments

Comments
 (0)