rust/src/test/compile-fail/block-copy.rs
2012-01-23 19:06:33 -08:00

9 lines
162 B
Rust

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