summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/E0631.rs
blob: 83dbdb77abeb5c1153843e68f4f0ccfcad365e79 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(unboxed_closures)]

fn foo<F: Fn(usize)>(_: F) {}
fn bar<F: Fn<(usize,)>>(_: F) {}
fn main() {
    fn f(_: u64) {}
    foo(|_: isize| {}); //~ ERROR type mismatch
    bar(|_: isize| {}); //~ ERROR type mismatch
    foo(f); //~ ERROR type mismatch
    bar(f); //~ ERROR type mismatch
}