main()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
baz<F: Fn(*mut &u32)>(_: F)8 fn baz<F: Fn(*mut &u32)>(_: F) {}
_test<'a>(f: fn(*mut &'a u32))9 fn _test<'a>(f: fn(*mut &'a u32)) {
10 baz(f);
11 //~^ ERROR implementation of `FnOnce` is not general enough
12 //~| ERROR implementation of `FnOnce` is not general enough
13 //~| ERROR mismatched types
14 //~| ERROR mismatched types
15 }
16