-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-syntaxextArea: Syntax extensionsArea: Syntax extensions
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-syntaxextArea: Syntax extensionsArea: Syntax extensions