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

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

9 lines
180 B
Rust
Raw Normal View History

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