diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-21 13:08:49 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-27 14:02:16 +0000 |
| commit | 939df293d8cd9053a83d750b17437bf5c7b1f007 (patch) | |
| tree | bd91ab28fdb648cd351e5969d741e9273a04a267 | |
| parent | 5ae546e108957acc08bc3559106090f6cf6aee37 (diff) | |
| download | rust-939df293d8cd9053a83d750b17437bf5c7b1f007.tar.gz rust-939df293d8cd9053a83d750b17437bf5c7b1f007.zip | |
Sort diagnostics by rendered trait ref instead of its def ids
| -rw-r--r-- | compiler/rustc_hir_typeck/src/method/suggest.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index 0dcde0cdecb..952d5368298 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -2549,7 +2549,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { _ => None, }) .collect(); - preds.sort_by_key(|pred| (pred.def_id(), pred.self_ty())); + preds.sort_by_key(|pred| pred.trait_ref.to_string()); let def_ids = preds .iter() .filter_map(|pred| match pred.self_ty().kind() { |
