rust/src/test/compile-fail/block-require-return.rs

4 lines
127 B
Rust
Raw Normal View History

// error-pattern: not all control paths return
2012-01-23 16:59:00 -06:00
fn force(f: fn() -> int) -> int { f() }
fn main() { log(error, force({|| })); }