]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/issue-20862.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / block-result / issue-20862.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-20862.rs:12:5
3    |
4 LL | fn foo(x: i32) {
5    |                - possibly return type missing here?
6 LL |     |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 LL |     let x = foo(5)(2);
16    |             ^^^^^^^^^ not a function
17
18 error: aborting due to 2 previous errors
19
20 Some errors occurred: E0308, E0618.
21 For more information about an error, try `rustc --explain E0308`.