Skip to content

Commit 782cba8

Browse files
committed
Add help about using cargo tree
1 parent ec2ccdc commit 782cba8

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
@@ -2041,10 +2041,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
20412041
let mut span: MultiSpan = vec![sp_candidate, sp_found].into();
20422042
span.push_span_label(self.tcx.def_span(trait_def_id), "this is the required trait");
20432043
span.push_span_label(sp_candidate, "this type implements the required trait");
2044-
span.push_span_label(
2045-
sp_found,
2046-
"this type doesn't implement the required trait",
2047-
);
2044+
span.push_span_label(sp_found, "this type doesn't implement the required trait");
20482045
err.highlighted_span_note(
20492046
span,
20502047
vec![
@@ -2057,6 +2054,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
20572054
],
20582055
);
20592056
}
2057+
err.help("you can use `cargo tree` to explore your dependency tree");
20602058
return true;
20612059
}
20622060

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

+13-11
Loading

0 commit comments

Comments
 (0)