Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upIn macros, expr followed by { is buggy #26739
Comments
Stebalien
changed the title
In macros, rust allows expr to be followed by {
In macros, expr followed by { is buggy
Jul 2, 2015
huonw
added
I-nominated
T-lang
A-macros
labels
Jul 2, 2015
This comment has been minimized.
This comment has been minimized.
|
triage: P-high (decision needed) For this and other macro rules, it's unclear how much we can change here, but I think we should make an effort to fix these bugs sooner rather than later if we are going to do so! |
rust-highfive
added
P-high
and removed
I-nominated
labels
Jul 9, 2015
nikomatsakis
assigned
pnkfelix
Jul 9, 2015
This comment has been minimized.
This comment has been minimized.
|
This was fixed by #30694 |
pnkfelix
closed this
Jan 14, 2016
This comment has been minimized.
This comment has been minimized.
|
(though i will note yet again that there may be motivation for adding a new syntactic class to macro rules, which I have been referring to tongue-in-cheek as |
pnkfelix
referenced this issue
Jan 15, 2016
Open
Add macro_rules fragment class for "expressions that can be followed by `{`" #1463
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stebalien commentedJul 2, 2015
The following compiles:
However, (1) this technically isn't allowed by the macro future proofing rules and (2) it doesn't work when
$eis an ident because rust tries to parseident {}as an invalid struct literal instantiation.The following works:
And the following doesn't:
Error: