Closed
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