Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Created January 4, 2014 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvssvni/8251925 to your computer and use it in GitHub Desktop.
Save bvssvni/8251925 to your computer and use it in GitHub Desktop.
#[feature(macro_rules)]
extern mod expr;
macro_rules! run(
($expr:expr $env:expr) => {
let (v, n) = (expr.run)(&mut env);
expr = n;
v
}
)
Compiler error:
error: macro definitions are not stable enough for use and are subject to change
/home/sven/Desktop/prob/src/expr/test.rs:5 macro_rules! run(
^~~~~~~~~~~
/home/sven/Desktop/prob/src/expr/test.rs:5:0: 5:11 note: add #[feature(macro_rules)] to the crate attributes to enable
/home/sven/Desktop/prob/src/expr/test.rs:5 macro_rules! run(
@jaredly
Copy link

jaredly commented Mar 31, 2014

btw the solution is to add a ; at the end of the #[... line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment