about summary refs log tree commit diff
path: root/src/test/compile-fail/closure-that-fails.rs
blob: aad0e8bcbb6dd874fa5ead459190574cdcfeb112 (plain)
1
2
3
4
5
6
7
fn foo(f: &fn() -> !) {}

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