-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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, ..)C-bugCategory: This is a bug.Category: This is a bug.
Description
This code should fail to compile, giving the same error message as fn use()
would give, but it compiles successfully.
macro_rules! foo {
($foo:ident) => {}
}
fn main() {
foo!(use);
}
This code should compile successfully. However, it fails complaining that it can't decide whether use
is an ident or not (hint: it isn't). It also shouldn't be trying to match use
as an ident because of the semicolon, but that's a broader/deeper issue with macro_rules!
macro_rules! foo {
($(use ;)* $foo:ident) => {}
}
fn main() {
foo!(use ; use ; bar);
}
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, ..)C-bugCategory: This is a bug.Category: This is a bug.