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

6 lines
166 B
Rust
Raw Normal View History

//error-pattern:expanded as an identifier
fn main() {
#macro([#mylambda(x, body), {fn f(int x) -> int {ret body}; f}]);
assert(#mylambda(y*1, y*2)(8) == 16);
}