diff options
Diffstat (limited to 'tests/ui/block-result/issue-20862.rs')
-rw-r--r-- | tests/ui/block-result/issue-20862.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/block-result/issue-20862.rs b/tests/ui/block-result/issue-20862.rs new file mode 100644 index 000000000..e435fd7ae --- /dev/null +++ b/tests/ui/block-result/issue-20862.rs @@ -0,0 +1,9 @@ +fn foo(x: i32) { + |y| x + y +//~^ ERROR: mismatched types +} + +fn main() { + let x = foo(5)(2); +//~^ ERROR: expected function, found `()` +} |