From 14c2933de2456111323f0fc6e956e01666d03e3b 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. --- src/tools/rust-analyzer/crates/ide/src/hover.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/rust-analyzer/crates/ide/src/hover.rs b/src/tools/rust-analyzer/crates/ide/src/hover.rs index 5cab8efa798d..6fd522095e91 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::>() }