about summary refs log tree commit diff
path: root/src/test/compile-fail/macro-2.rs
blob: a802301756cae569d4288fb119907067626eb33d (plain)
1
2
3
4
5
6
7
8
9
10
//error-pattern:is an expr, expected an identifier
fn main() {
    #macro[[#mylambda[x, body],
            {
                fn f(x: int) -> int { ret body }
                f
            }]];

    assert (#mylambda[y * 1, y * 2](8) == 16);
}