-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to use or-patterns within expressions in match arms #14516
Comments
See also #9663—I guess this should go through the RFC process at this point |
This is a dupe of #17180, and as @P1start mentioned over there the corresponding RFC is rust-lang/rfcs#99, so I'm going to close this in favor of the RFC. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 5, 2023
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: rust-lang#14516
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We already can use patterns like
Some(_)
in a match arm. However, stuff likeSome( 1 | 2 | 3)
doesn't work.Could support for nesting patterns be added?
The text was updated successfully, but these errors were encountered: