rust/src/test/compile-fail/closure-that-fails.rs

8 lines
165 B
Rust
Raw Normal View History

fn foo(f: &fn() -> !) {}
fn main() {
// Type inference didn't use to be able to handle this:
2013-09-29 22:06:21 -05:00
foo(|| fail2!());
foo(|| 22); //~ ERROR mismatched types
}