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

9 lines
170 B
Rust

// error-pattern: stack closure type can only appear
fn lol(f: fn()) -> fn() { ret f; }
fn main() {
let i = 8;
let f = lol(fn&() { log(error, i); });
f();
}