rust/src/test/compile-fail/block-copy.rs

9 lines
170 B
Rust
Raw Normal View History

// error-pattern: stack closure type can only appear
2011-07-25 18:57:27 -05:00
2012-01-23 16:59:00 -06:00
fn lol(f: fn()) -> fn() { ret f; }
fn main() {
let i = 8;
2012-01-23 16:59:00 -06:00
let f = lol(fn&() { log(error, i); });
f();
}