diff options
| author | Chayim Refael Friedman <chayimfr@gmail.com> | 2025-04-18 12:45:22 +0300 |
|---|---|---|
| committer | Chayim Refael Friedman <chayimfr@gmail.com> | 2025-04-18 12:45:22 +0300 |
| commit | 14c2933de2456111323f0fc6e956e01666d03e3b (patch) | |
| tree | d3b4cd9e925a77c78159027e20a497360669abbb | |
| parent | 6f994da630b60a1f577065581c7f2f83b1abfce9 (diff) | |
| download | rust-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.rs | 1 |
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<_>>() } |
