rust/crates
bors 5111207d9a Auto merge of #14591 - justahero:gh-14516, r=Veykril
Restrict "sort items" assist for traits & impls

This restricts the "sort items alphabetically" assist when the selection is inside a `Impl` or `Trait` node & intersects with one of the associated items.

It re-orders the conditional checks of AST nodes in the `sort_items` function to check for more specific nodes first before checking `Trait` or `Impl` nodes. The `AssistContext` is passed into the `add_sort_methods_assist` function to check if the selection intersects with any inner items, e.g. associated const or type alias, function. In this case the assist does not apply.

Fixes: #14516
2023-04-17 12:45:31 +00:00
..
base-db Add toolchain meta for tests 2023-04-11 21:21:10 +09:00
cfg
flycheck
hir Actually bring back LRU limit for macro_expand query 2023-04-16 23:12:25 +02:00
hir-def Auto merge of #14587 - Veykril:macro-def-err, r=Veykril 2023-04-16 19:30:42 +00:00
hir-expand Re-introduce option for macro_arg to prevent calling macros with empty inputs 2023-04-16 20:26:26 +02:00
hir-ty Option begone part 2 2023-04-16 19:20:48 +02:00
ide Option begone part 2 2023-04-16 19:20:48 +02:00
ide-assists Auto merge of #14591 - justahero:gh-14516, r=Veykril 2023-04-17 12:45:31 +00:00
ide-completion Add flag to disallow opaque types for DisplayTarget::SourceCode 2023-04-12 19:03:48 +09:00
ide-db Actually bring back LRU limit for macro_expand query 2023-04-16 23:12:25 +02:00
ide-diagnostics Option begone part 2 2023-04-16 19:20:48 +02:00
ide-ssr
intern
limit
mbe Option begone part 2 2023-04-16 19:20:48 +02:00
parser Parse inline const pattern in nested patterns 2023-04-16 04:28:37 +09:00
paths
proc-macro-api Encode closing delimiter span in FlatTrees 2023-04-14 10:34:41 +02:00
proc-macro-srv Encode closing delimiter span in FlatTrees 2023-04-14 10:34:41 +02:00
proc-macro-srv-cli
proc-macro-test
profile
project-model internal: Warn when loading sysroot fails to find the core library 2023-04-13 08:40:14 +02:00
rust-analyzer Option begone part 2 2023-04-16 19:20:48 +02:00
sourcegen
stdx
syntax Bump smol-str 2023-04-11 14:39:19 +02:00
test-utils Auto merge of #14544 - HKalbasi:dev, r=Veykril 2023-04-11 14:49:04 +00:00
text-edit
toolchain
tt Bump smol-str 2023-04-11 14:39:19 +02:00
vfs
vfs-notify