rust-analyzer/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 ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
flycheck Bump Cargo.lock 2023-03-25 15:12:39 +01:00
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 ⬆️ rust-analyzer 2023-03-13 10:42:24 +02:00
intern ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
limit ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
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 Canonicalize rust-project.json manifest path 2023-03-27 21:55:02 +02:00
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 Drop support for non-syroot proc macro ABIs 2023-03-29 10:57:32 +02:00
proc-macro-test ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
profile Bump Cargo.lock 2023-03-25 15:12:39 +01:00
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 Use retain_mut in CommentBlock::extract 2023-03-31 17:41:40 -04:00
stdx ⬆️ rust-analyzer 2023-02-20 10:14:12 +02:00
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 internal: Coalesce adjacent Indels 2023-03-21 11:48:32 -04:00
toolchain ⬆️ rust-analyzer 2023-03-13 10:42:24 +02:00
tt Bump smol-str 2023-04-11 14:39:19 +02:00
vfs internal: Refine CrateOrigin variants 2023-03-31 10:36:13 +02:00
vfs-notify ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00