-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
parser: support paths in bang macro invocations (e.g. path::to::macro!()
)
#36662
Conversation
} | ||
|
||
m!(); //~ NOTE the usage of `m!` is likely invalid in item context | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this PR, this would trigger a parse error when expanded (expected one of
!or
::``).
9b1c954
to
be28b20
Compare
be28b20
to
2c85733
Compare
Looks good. Note to myself: audit all places where disambiguation "path vs ident" happens, there are still some inconsistencies. |
Am I right that this PR means path macros can be parsed but will always give an error later on before being expanded? If not, then it'd be good to have a feature gate in here. Could you add some tests too please? |
Yeah, |
Added tests. |
@bors: r+ |
📌 Commit 34f4ad1 has been approved by |
…r=nrc parser: support paths in bang macro invocations (e.g. `path::to::macro!()`) r? @nrc
…r=nrc parser: support paths in bang macro invocations (e.g. `path::to::macro!()`) r? @nrc
Groundwork for macro modularization (cc #35896).
r? @nrc