-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
None-delimited group from proc macro fails to disambiguate type (macro_rules invisible type syntax magic?) #124817
Comments
Complete output with
|
Code available here
I think that what is happening is: macro_rules If so then there are at least three things wrong:
|
This is a duplicate of #67062. |
To reproduce
proc macro
main.rs
Expected behaviour
The program compiles, emiitting some debug output to stderr during compilation.
Actual behaviour
Observations
The final macro output is, in both cases:
where I'm using « » to denote the
None
-delimitedGroup
, which is there precisely to resolve the ambiguity the compiler is complaining about. Note that the error appears ony once: if the proc macro version is commented out, it compiles.So macro_rules was able to somehow write something that worked. But the debug output is completely identical in both cases (except for differences in spans). The distinction, whatever it is, is invisible. It also doesn't seem to be documented anywhere.
And, it just seems wrong. Surely this is what a None-delimited group is for.
The text was updated successfully, but these errors were encountered: