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
..
2023-04-11 21:21:10 +09:00
2023-04-16 19:20:48 +02:00
2023-04-16 19:20:48 +02:00
2023-04-16 19:20:48 +02:00
2023-04-16 19:20:48 +02:00
2023-04-16 19:20:48 +02:00
2023-04-11 14:39:19 +02:00
2023-04-11 14:39:19 +02:00