Skip to content

Instantly share code, notes, and snippets.

@sfackler
Forked from anonymous/gist:9009592
Created February 14, 2014 21:26
Show Gist options
  • Save sfackler/9009652 to your computer and use it in GitHub Desktop.
Save sfackler/9009652 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