]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/E0631.rs
New upstream version 1.65.0+dfsg1
[rustc.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 }