]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/issue-20862.stderr
e4367f170ce1856dbb33c6660800e6aeb2b23171
[rust.git] / src / test / ui / block-result / issue-20862.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-20862.rs:12:5
3    |
4 11 | fn foo(x: i32) {
5    |                - possibly return type missing here?
6 12 |     |y| x + y
7    |     ^^^^^^^^^ expected (), found closure
8    |
9    = note: expected type `()`
10               found type `[closure@$DIR/issue-20862.rs:12:5: 12:14 x:_]`
11
12 error[E0618]: expected function, found `()`
13   --> $DIR/issue-20862.rs:17:13
14    |
15 17 |     let x = foo(5)(2);
16    |             ^^^^^^^^^
17
18 error: aborting due to previous error(s)
19