Closed
Description
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):
macro_rules! gen {
($name:ident ($($dol:tt $var:ident)*) $($body:tt)*) => {
macro_rules! $name {
($($dol $var:ident)*) => {
$($body)*
}
}
}
}
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
durka commentedon May 15, 2017
cc @jseyfried
jseyfried commentedon May 15, 2017
I believe this is a duplicate of #41803; it should be fixed once #42005 lands.
nagisa commentedon May 18, 2017
Now that #42005 has landed, this should be re-reproduced.
durka commentedon May 18, 2017
It landed, but why is there no nightly?
durka commentedon May 19, 2017
This was not fixed by #42005. It is still broken with rustc 1.19.0-nightly (0ed1ec9 2017-05-18).
brson commentedon May 25, 2017
Still broken on beta too I guess?
durka commentedon May 25, 2017
Yes, the code in the playpen still fails to compile on beta and nightly.
nikomatsakis commentedon May 25, 2017
cc @Mark-Simulacrum -- it'd be great to know just what caused this problem. @jseyfried, are you going to have time to investigate?
Mark-Simulacrum commentedon May 25, 2017
If I have a chance I'll run bisect-rust, also cc @est31 -- they have it working locally as well.
Mark-Simulacrum commentedon May 25, 2017
Ran bisect: fe15119 - #40597.
11 remaining items