about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2025-04-18 12:45:22 +0300
committerChayim Refael Friedman <chayimfr@gmail.com>2025-04-18 12:45:22 +0300
commit14c2933de2456111323f0fc6e956e01666d03e3b (patch)
treed3b4cd9e925a77c78159027e20a497360669abbb
parent6f994da630b60a1f577065581c7f2f83b1abfce9 (diff)
downloadrust-14c2933de2456111323f0fc6e956e01666d03e3b.tar.gz
rust-14c2933de2456111323f0fc6e956e01666d03e3b.zip
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.
-rw-r--r--src/tools/rust-analyzer/crates/ide/src/hover.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/hover.rs b/src/tools/rust-analyzer/crates/ide/src/hover.rs
index 5cab8efa798..6fd522095e9 100644
--- a/src/tools/rust-analyzer/crates/ide/src/hover.rs
+++ b/src/tools/rust-analyzer/crates/ide/src/hover.rs
@@ -505,6 +505,7 @@ fn notable_traits(
                 )
             })
         })
+        .sorted_by_cached_key(|(trait_, _)| trait_.name(db))
         .collect::<Vec<_>>()
 }