Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2014 21:23
Show Gist options
  • Save anonymous/9009592 to your computer and use it in GitHub Desktop.
Save anonymous/9009592 to your computer and use it in GitHub Desktop.
#[feature(macro_rules)];
use spec::test;
use spec::my_macro;
#[feature(macro_escape)]
mod spec {
#[macro_export]
macro_rules! my_macro (
() => (println!("hello"));
)
pub fn test() -> () {
my_macro!();
}
}
fn main() -> () {
my_macro!()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment