rust/src/test/ui/block-result/issue-20862.rs
2018-12-25 21:08:33 -07:00

10 lines
142 B
Rust

fn foo(x: i32) {
|y| x + y
//~^ ERROR: mismatched types
}
fn main() {
let x = foo(5)(2);
//~^ ERROR: expected function, found `()`
}