]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/E0631.rs
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[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 }