rust/tests/ui/lifetimes/issue-105675.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
547 B
Rust
Raw Normal View History

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