-
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
macro fragment names are no longer idents #42019
Comments
cc @jseyfried |
Now that #42005 has landed, this should be re-reproduced. |
It landed, but why is there no nightly? |
Still broken on beta too I guess? |
Yes, the code in the playpen still fails to compile on beta and nightly. |
cc @Mark-Simulacrum -- it'd be great to know just what caused this problem. @jseyfried, are you going to have time to investigate? |
If I have a chance I'll run bisect-rust, also cc @est31 -- they have it working locally as well. |
@jseyfried any progress? |
This is a P-high bug and it is inactive cc @rust-lang/compiler |
Fixed in #43224. |
This is a stable-to-beta regression, but it's such a weird thing to do that I don't know if it counts.
Consider the following code (playpen):
The
gen
macro parses a macro argument spec by matching a dollar sign with$dol
and the fragment name with$var
. Then (in this toy example) it just regurgitates that adding:ident
as the type of each fragment.This works in 1.17, but fails when invoked in 1.18 and nightly with the message "expected identifier, found [the ident passed in for
$var
]", pointing at$var
on line 4. All three channels work if$var:ident
is changed to$var:tt
on line 2.The text was updated successfully, but these errors were encountered: