about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-17 12:45:31 +0000
committerbors <bors@rust-lang.org>2023-04-17 12:45:31 +0000
commit5111207d9ad5e4156cf2ee330e6343b4821fa5a0 (patch)
tree7aaac653eecc790c22db940f40a3936e85e3daf3 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
parentbab80dae445fd576cb4cc22ba208e9fbc39dc18d (diff)
parentc1712e55c6d7fbb9d7ccef5de0be0b1c41033219 (diff)
downloadrust-5111207d9ad5e4156cf2ee330e6343b4821fa5a0.tar.gz
rust-5111207d9ad5e4156cf2ee330e6343b4821fa5a0.zip
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
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions