PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/compile-fail/macro-2.rs

http://github.com/jruderman/rust
Rust | 10 lines | 8 code | 1 blank | 1 comment | 1 complexity | 1f6b661338e77da915361480450644c3 MD5 | raw file
 1//error-pattern:is an expr, expected an identifier
 2fn main() {
 3    #macro[[#mylambda[x, body],
 4            {
 5                fn f(x: int) -> int { return body }
 6                f
 7            }]];
 8
 9    assert (mylambda!{y * 1, y * 2}(8) == 16);
10}