]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/E0631.rs
Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup
[rust.git] / src / test / ui / mismatched_types / E0631.rs
1 #![feature(unboxed_closures)]
2
3 fn foo<F: Fn(usize)>(_: F) {}
4 fn bar<F: Fn<usize>>(_: F) {}
5 fn main() {
6     fn f(_: u64) {}
7     foo(|_: isize| {}); //~ ERROR type mismatch
8     bar(|_: isize| {}); //~ ERROR type mismatch
9     foo(f); //~ ERROR type mismatch
10     bar(f); //~ ERROR type mismatch
11 }