rust/crates/ide-assists/src
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
..
handlers Auto merge of #14591 - justahero:gh-14516, r=Veykril 2023-04-17 12:45:31 +00:00
tests feat: restrict applicable range of reorder-impl-trait-items 2023-04-09 00:14:48 +08:00
utils Test TraitRef equality before generating missing impl method body 2023-01-16 20:55:56 +09:00
assist_config.rs feat: add config for inserting must_use in generate_enum_as_method 2022-10-24 13:18:24 +05:30
assist_context.rs Import serde derives on converting json to struct 2022-08-06 20:12:21 +04:30
lib.rs Add assist to convert nested function to closure 2023-03-31 12:16:49 +02:00
tests.rs internal: Set Durability to HIGH for enable_proc_attr_macros input 2023-03-30 15:11:22 +02:00
utils.rs Don't escape non-snippets in assist 2023-01-23 00:22:46 +09:00