diff options
Diffstat (limited to 'tests/ui/lifetimes/issue-79187.rs')
-rw-r--r-- | tests/ui/lifetimes/issue-79187.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/issue-79187.rs b/tests/ui/lifetimes/issue-79187.rs new file mode 100644 index 000000000..8e1304562 --- /dev/null +++ b/tests/ui/lifetimes/issue-79187.rs @@ -0,0 +1,8 @@ +fn thing(x: impl FnOnce(&u32)) {} + +fn main() { + let f = |_| (); + thing(f); + //~^ ERROR mismatched types + //~^^ ERROR implementation of `FnOnce` is not general enough +} |