rust/tests/ui/lifetimes/issue-105675.rs
Alex Chi 173b8567ee use param instead of ty
Signed-off-by: Alex Chi <iskyzh@gmail.com>
2023-04-14 11:39:35 -04:00

15 lines
425 B
Rust

fn thing(x: impl FnOnce(&u32, &u32, u32)) {}
fn main() {
let f = | _ , y: &u32 , z | ();
thing(f);
//~^ ERROR mismatched types
//~^^ ERROR mismatched types
let f = | x, y: _ , z: u32 | ();
thing(f);
//~^ ERROR mismatched types
//~^^ ERROR mismatched types
//~^^^ ERROR implementation of `FnOnce` is not general enough
//~^^^^ ERROR implementation of `FnOnce` is not general enough
}