Created
July 16, 2014 23:36
-
-
Save nathantypanski/0d0a83a56ddb8e9623cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[feature(macro_rules)]; | |
#![feature(phase)] | |
#[phase(plugin, link)] extern crate log; | |
macro_rules! expr (($e: expr) => { $e }) | |
macro_rules! spawn { | |
($($code: block)*) => { | |
expr!(spawn(proc() {$($code)*})) | |
} | |
} | |
pub fn main() { | |
spawn! { | |
{info!("stmt");} | |
}; | |
let _ = spawn! { | |
{info!("expr");} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment