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

9 lines
162 B
Rust
Raw Normal View History

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