From 41227f01d20ccdccc06815da7a15e1c48d1ee057 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Fri, 18 Apr 2025 12:45:22 +0300 Subject: [PATCH] Sort notable traits in hover Previously it was ordered by what accidentally happened to be the crate graph order, which isn't sensible, plus it caused changes when any change was done to salsa IDs. --- crates/ide/src/hover.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 5cab8efa798d..6fd522095e91 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -505,6 +505,7 @@ fn notable_traits( ) }) }) + .sorted_by_cached_key(|(trait_, _)| trait_.name(db)) .collect::>() }