-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Enable $($pattern)|+
or equivalent in macro_rules!
#20843
Comments
Triage: I am not aware of any change here. @SimonSapin do you still feel this pain? (and is this RFC-worthy?) |
I’m not very happy with the work-around described above, but it’s hidden away in https://crates.io/crates/matches/ so I don’t think need to about it. |
|
Okay it landed and here's the test: https://github.com/rust-lang/rust/pull/30694/files#diff-b3d1417aaa1fb8f3fa7c449b1f54cbfc So I'm closing this ticket. |
Confirmed that the original macro in this issue (with |
I use this macro a lot:
But today’s Nightly broke it (#20563 (comment)) with apparently no fix that don’t involve changing the usage syntax.
A work around (that I’m going to use) is to use
tt
:But it’s not great since it allows sneaking another
match
arm into the macro expansion:Therefore, I think think that something like the original macro should be possible to write.
The text was updated successfully, but these errors were encountered: