Skip to content
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

Support 2021 Edition pat matcher in macro_rules #9055

Closed
jonas-schievink opened this issue May 29, 2021 · 2 comments · Fixed by #14652
Closed

Support 2021 Edition pat matcher in macro_rules #9055

jonas-schievink opened this issue May 29, 2021 · 2 comments · Fixed by #14652
Labels
A-macro macro expansion Broken Window Bugs / technical debt to be addressed immediately S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@jonas-schievink
Copy link
Contributor

When a macro is defined in an edition 2021 crate, the :pat matcher should match "pattern_top" instead of "pattern_single", which allows or-patterns. :pat_param will match "pattern_single" in all editions.

@jonas-schievink jonas-schievink added A-macro macro expansion S-actionable Someone could pick this issue up and work on it right now labels May 29, 2021
@jonas-schievink
Copy link
Contributor Author

Since this requires knowing the crate edition in some rather annoying places, I'd like to wait with this until the edition-dependent lexer changes in #9056 are implemented upstream, since that might already give us the required info

@jonas-schievink jonas-schievink added S-unactionable Issue requires feedback, design decisions or is blocked on other work and removed S-actionable Someone could pick this issue up and work on it right now labels Jun 2, 2021
@Veykril
Copy link
Member

Veykril commented Mar 21, 2023

We should prioritize fixing this now, as this is being used by the matches macro soon, rust-lang/rust#108829

@Veykril Veykril added the Broken Window Bugs / technical debt to be addressed immediately label Mar 21, 2023
@bors bors closed this as completed in 707382c Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro macro expansion Broken Window Bugs / technical debt to be addressed immediately S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants