Rollup merge of #126127 - Alexendoo:other-trait-diag, r=pnkfelix
Spell out other trait diagnostic I recently saw somebody confused about the diagnostic thinking it was suggesting to add an `as` cast. This change is longer but I think it's clearer
This commit is contained in:
commit
936d76009b
42 changed files with 348 additions and 348 deletions
|
@ -2068,7 +2068,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
if all_traits_equal {
|
||||
format!("\n {}", c.self_ty())
|
||||
} else {
|
||||
format!("\n {c}")
|
||||
format!("\n `{}` implements `{}`", c.self_ty(), c.print_only_trait_path())
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue