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

4 lines
141 B
Rust
Raw Normal View History

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