Closed
Description
Parsing of the following snippet is failing on Rust 1.30 beta:
#![cfg_attr(feature = "nightly", feature(plugin_registrar, rustc_private,quote,),)]
- command-macros
0.1.11
regressed from stable to beta (build log) cc @krdln
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
petrochenkov commentedon Sep 22, 2018
Most probably caused by #53893.
I wonder why the previous crater run didn't caught this.
eddyb commentedon Sep 22, 2018
@petrochenkov According to @pietroalbini, before and after had the same error (for #53893).
Is it possible a (different?) regression landed on master before that crater run?
pietroalbini commentedon Sep 22, 2018
The regression is caused by #53293, which didn't go through a Crater run.
petrochenkov commentedon Sep 23, 2018
(plugin_registrar, rustc_private,quote,),
after the attribute pathfeature
was parsed as an arbitrary token stream containing two token trees - parenthesized group(...)
and comma,
.Arbitrary token streams were never supposed to work on stable channel, but this wasn't properly enforced.
In particular, the unstable syntax was usable in code that's
cfg
-ed out.The point of #53293 was exactly to fix this hole, so I think this issue is WONTFIX, as stated by rust-lang/rfcs#2405, especially given that this is the only regression of this kind and the code in
command-macros
was fixed long ago.Note, that
#![cfg_attr(feature = "nightly", feature(plugin_registrar, rustc_private,quote,),)]
doesn't compile on stable iffeature = "nightly"
is actually enabled.petrochenkov commentedon Sep 24, 2018
We can accept trailing comma in
cfg_attr
specifically though.It will need to be accepted anyway when rust-lang/rfcs#2539 is implemented.
cfg_attr
#54581petrochenkov commentedon Sep 26, 2018
Fixed in #54581
Rollup merge of rust-lang#54581 - petrochenkov:cfgattr, r=alexcrichton
Auto merge of #54581 - petrochenkov:cfgattr, r=alexcrichton