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 Jun 24, 2024
1 parent 7340903 commit e756425
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 @@ -2039,10 +2039,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 @@ -2055,6 +2052,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
Loading
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 e756425

Please sign in to comment.