Closed
Description
#[feature(macro_rules)];
macro_rules! mymacro(
($x:ident) => ( "foo" );
)
fn main() {
println(mymacro!());
}
$ rustc --version
rustc 0.9-pre (a7453ad 2013-10-22 15:31:26 -0700)
host: x86_64-unknown-linux-gnu
$ rustc foo.rs
foo.rs:1:0: 1:0 error: Unexpected end of macro invocation
foo.rs:1 #[feature(macro_rules)];
^
The error is the missing argument to the mymacro!()
invocation. The error caret should point there, not to the first line in the crate.