]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/E0631.rs
Rollup merge of #107027 - GuillaumeGomez:rm-extra-removal, r=tmiasko
[rust.git] / tests / 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 }