-
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
The meta
fragment specifier is considered as a single TT.
#34011
Comments
It could happen. |
steveklabnik
added
the
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
label
Jun 6, 2016
bors
added a commit
that referenced
this issue
Aug 17, 2019
syntax: Support modern attribute syntax in the `meta` matcher Where "modern" means #57367: ``` PATH PATH `(` TOKEN_STREAM `)` PATH `[` TOKEN_STREAM `]` PATH `{` TOKEN_STREAM `}` ``` Unfortunately, `meta` wasn't future-proofed using the `FOLLOW` token set like other matchers (#34011), so code like `$meta:meta {` or `$meta:meta [` may break, and we need a crater run to find out how often this happens in practice. Closes #49629 (by fully supporting `meta` rather than removing it.)
Centril
added a commit
to Centril/rust
that referenced
this issue
Oct 1, 2019
syntax: Support modern attribute syntax in the `meta` matcher Where "modern" means rust-lang#57367: ``` PATH PATH `(` TOKEN_STREAM `)` PATH `[` TOKEN_STREAM `]` PATH `{` TOKEN_STREAM `}` ``` Unfortunately, `meta` wasn't future-proofed using the `FOLLOW` token set like other matchers (rust-lang#34011), so code like `$meta:meta {` or `$meta:meta [` may break, and we need a crater run to find out how often this happens in practice. Closes rust-lang#49629 (by fully supporting `meta` rather than removing it.)
Centril
added a commit
to Centril/rust
that referenced
this issue
Oct 1, 2019
syntax: Support modern attribute syntax in the `meta` matcher Where "modern" means rust-lang#57367: ``` PATH PATH `(` TOKEN_STREAM `)` PATH `[` TOKEN_STREAM `]` PATH `{` TOKEN_STREAM `}` ``` Unfortunately, `meta` wasn't future-proofed using the `FOLLOW` token set like other matchers (rust-lang#34011), so code like `$meta:meta {` or `$meta:meta [` may break, and we need a crater run to find out how often this happens in practice. Closes rust-lang#49629 (by fully supporting `meta` rather than removing it.)
Triage: honestly, I'm not good enough with macros to know what exactly the details are here; it seems that #63764 expanded the syntax even with this roadblock. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At various locations of the FOLLOW sets analysis for
macro_rules!
,meta
is considered as always matching a single TT. This is not the case:ident = ...
andident(...)
are both validmeta
s.That being said the only consequence of this is that
meta
can be followed by anything, and I think it's not unreasonable to assume that the syntax ofmeta
will not be expanded in the future... But still, we might want to check that.The text was updated successfully, but these errors were encountered: