/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
- //error-pattern:is an expr, expected an identifier
- fn main() {
- #macro[[#mylambda[x, body],
- {
- fn f(x: int) -> int { return body }
- f
- }]];
- assert (mylambda!{y * 1, y * 2}(8) == 16);
- }