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

9 lines
180 B
Rust
Raw Normal View History

fn thing(x: impl FnOnce(&u32)) {}
fn main() {
let f = |_| ();
2022-05-22 06:05:15 +00:00
thing(f);
2022-04-01 17:13:25 +00:00
//~^ ERROR mismatched types
2022-05-22 06:05:15 +00:00
//~^^ ERROR implementation of `FnOnce` is not general enough
}