- Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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 ASTC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Description
Minimal test case:
struct Foo; impl Foo { macro_rules! bar { () => ( println!("Hi"); ); } pub fn say() { bar!(); } } fn main() { Foo::say(); }On stable it emits the following error:
rustc 1.12.0 (3191fbae9 2016-09-23) error: expected one of `const`, `default`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `macro_rules` --> <anon>:4:5 | 4 | macro_rules! bar { | ^^^^^^^^^^^ error: aborting due to previous error And on beta or nightly, it emits the following instead:
rustc 1.14.0-nightly (6e8f92f11 2016-10-07) error: expected open delimiter --> <anon>:4:18 | 4 | macro_rules! bar { | ^^^ error: aborting due to previous error uint-nate, Korvox, hufuhufu, avalon1610 and Be3y4uu-K0T
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-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 ASTC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.