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

6 lines
132 B
Rust
Raw Normal View History

// error-pattern: not all control paths return
fn force(f: &block() -> int) -> int { f() }
fn main() {
log_err force({| | });
}