rust/src/test/compile-fail/closure-that-fails.rs
2013-11-26 08:19:00 -08:00

8 lines
161 B
Rust

fn foo(f: || -> !) {}
fn main() {
// Type inference didn't use to be able to handle this:
foo(|| fail!());
foo(|| 22); //~ ERROR mismatched types
}