]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/closure-arg-type-mismatch.rs
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
[rust.git] / tests / ui / mismatched_types / closure-arg-type-mismatch.rs
1 fn main() {
2     let a = [(1u32, 2u32)];
3     a.iter().map(|_: (u32, u32)| 45); //~ ERROR type mismatch
4     a.iter().map(|_: &(u16, u16)| 45); //~ ERROR type mismatch
5     a.iter().map(|_: (u16, u16)| 45); //~ ERROR type mismatch
6 }
7
8 fn baz<F: Fn(*mut &u32)>(_: F) {}
9 fn _test<'a>(f: fn(*mut &'a u32)) {
10     baz(f);
11 }