Skip to content

Commit

Permalink
Add help about using cargo tree
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 13, 2024
1 parent ec2ccdc commit 782cba8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2041,10 +2041,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
let mut span: MultiSpan = vec![sp_candidate, sp_found].into();
span.push_span_label(self.tcx.def_span(trait_def_id), "this is the required trait");
span.push_span_label(sp_candidate, "this type implements the required trait");
span.push_span_label(
sp_found,
"this type doesn't implement the required trait",
);
span.push_span_label(sp_found, "this type doesn't implement the required trait");
err.highlighted_span_note(
span,
vec![
Expand All @@ -2057,6 +2054,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
],
);
}
err.help("you can use `cargo tree` to explore your dependency tree");
return true;
}

Expand Down
24 changes: 13 additions & 11 deletions tests/ui/crate-loading/multiple-dep-versions.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 782cba8

Please sign in to comment.