-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Allow alternation within sub-patterns #17180
Comments
rust-lang/rfcs#99 proposed such an addition (among other things), but was postponed until post-1.0. |
As @P1start mentioned, this is currently a postponed RFC, so I'm closing in favor of that. |
rust-lang/rfcs#1882 is a more recent version of this request |
rust-lang/rfcs#2175 addresses part of this feature. |
New RFC for this feature: rust-lang/rfcs#2535. |
Update: RFC 2535 was implemented and will become stable in Rust 1.53. |
minor: bump `peaceiris/actions-gh-pages`
Allowing
|
to be used within a sub-pattern would allow some match expressions on tuples and structs to be written much more clearly and concisely.For example, the following match expression:
would be equivalent to this expanded version:
The text was updated successfully, but these errors were encountered: