-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reject a LHS formed of a single sequence TT during macro_rules!
checking.
#33841
Conversation
@LeoTestard does this need to wait for #33713 to land before it can land? Or are they independent? |
Ah, good point, they are independent but I'm afraid it will break it and require rebase. Let's wait then. |
☔ The latest upstream changes (presumably #33713) made this pull request unmergeable. Please resolve the merge conflicts. |
b14e484
to
c589685
Compare
…cking. This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug.
c589685
to
864b3c8
Compare
I removed a test because the issue it was introduced for (#21350) involves code that seem to rely on the feature that this PR is removing. Thing is that the macro expander doesn't accept macros with this kind of LHS. I don't know why this issue was opened, maybe it was accepted by the expander at the time? Another possibility is of course to fix the test to use parens, but I feel like that would be a completely different test (and actually, there are others test that do the same). Thoughts @cmr? |
@LeoTestard my interpretation is that we wanted to ensure we didn't ICE as a first priority So you might move the original text to this change might break crates in the wild (only ones that have macros with dead arms using the erroneous syntax I think) . So we might want to put it through a warning cycle? |
@pnkfelix I'm pretty sure it's already covered. |
@pnkfelix Up? r? |
@bors r+ rollup |
📌 Commit 864b3c8 has been approved by |
Reject a LHS formed of a single sequence TT during `macro_rules!` checking. This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug. Follow up to #33689. r? @pnkfelix Note: this can break code that defines such macros but does not use them.
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
@bors: retry On Tue, May 31, 2016 at 9:17 AM, bors notifications@github.com wrote:
|
💔 Test failed - auto-linux-64-cross-freebsd |
@bors: retry On Tue, May 31, 2016 at 3:55 PM, bors notifications@github.com wrote:
|
…kfelix Reject a LHS formed of a single sequence TT during `macro_rules!` checking. This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug. Follow up to rust-lang#33689. r? @pnkfelix Note: this can break code that defines such macros but does not use them.
This was already rejected during expansion. Encountering malformed LHS or RHS during expansion is now considered a bug.
Follow up to #33689.
r? @pnkfelix
Note: this can break code that defines such macros but does not use them.