2012-07-11 12:42:59 -05:00
|
|
|
// xfail-pretty - token trees can't pretty print
|
|
|
|
|
2011-06-27 12:58:05 -05:00
|
|
|
fn main() {
|
2012-07-11 12:42:59 -05:00
|
|
|
|
2012-08-22 19:47:11 -05:00
|
|
|
macro_rules! mylambda_tt(
|
2012-11-21 14:53:49 -06:00
|
|
|
($x:ident, $body:expr) => ({
|
2012-08-01 19:30:05 -05:00
|
|
|
fn f($x: int) -> int { return $body; };
|
2012-07-11 12:42:59 -05:00
|
|
|
f
|
2012-11-21 14:53:49 -06:00
|
|
|
})
|
2012-08-22 19:47:11 -05:00
|
|
|
)
|
2012-07-11 12:42:59 -05:00
|
|
|
|
2012-08-22 19:24:52 -05:00
|
|
|
assert(mylambda_tt!(y, y * 2)(8) == 16)
|
2011-08-19 17:16:48 -05:00
|
|
|
}
|