]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/issue-20862.stderr
fuzzify `fuzzy_match_tys`
[rust.git] / src / test / ui / block-result / issue-20862.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-20862.rs:2: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 unit type `()`
10                 found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14]`
11
12 error[E0618]: expected function, found `()`
13   --> $DIR/issue-20862.rs:7:13
14    |
15 LL | fn foo(x: i32) {
16    | -------------- `foo` defined here returns `()`
17 ...
18 LL |     let x = foo(5)(2);
19    |             ^^^^^^---
20    |             |
21    |             call expression requires function
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0308, E0618.
26 For more information about an error, try `rustc --explain E0308`.