-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
E.g. this compiles on rustc 1.20.0-nightly (c9bb93576 2017-06-24)
macro_rules! m {
() => {
struct $crate {}
}
}
m!();
fn main() {}
This is a regression from Rust 1.14.0.
$crate
should be accepted only as a first segment in a path, so it would be reasonable to turn it from an "arbitrary identifier" into a "path segment keyword" like Self
/self
/super
.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.