2012-07-11 12:42:59 -05:00
|
|
|
// xfail-pretty - token trees can't pretty print
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
#macro[[#m1[a], a * 4]];
|
2012-08-22 19:24:52 -05:00
|
|
|
assert (m1!(2) == 8);
|
2012-07-11 12:42:59 -05:00
|
|
|
|
2012-08-22 19:47:11 -05:00
|
|
|
macro_rules! m1tt (
|
2012-08-22 20:06:54 -05:00
|
|
|
($a:expr) => {$a*4}
|
2012-08-22 19:47:11 -05:00
|
|
|
);
|
2012-08-22 19:24:52 -05:00
|
|
|
assert(m1tt!(2) == 8);
|
2012-07-11 12:42:59 -05:00
|
|
|
}
|