]> git.proxmox.com Git - rustc.git/blame - src/test/ui/block-result/issue-20862.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / block-result / issue-20862.stderr
CommitLineData
041b39d2 1error[E0308]: mismatched types
0731742a 2 --> $DIR/issue-20862.rs:2:5
041b39d2 3 |
0531ce1d 4LL | fn foo(x: i32) {
041b39d2 5 | - possibly return type missing here?
0531ce1d 6LL | |y| x + y
60c5eb7d 7 | ^^^^^^^^^ expected `()`, found closure
041b39d2 8 |
60c5eb7d
XL
9 = note: expected unit type `()`
10 found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
041b39d2
XL
11
12error[E0618]: expected function, found `()`
0731742a 13 --> $DIR/issue-20862.rs:7:13
041b39d2 14 |
a1dfa0c6
XL
15LL | / fn foo(x: i32) {
16LL | | |y| x + y
532ac7d7 17LL | |
a1dfa0c6
XL
18LL | | }
19 | |_- `foo` defined here returns `()`
20...
21LL | let x = foo(5)(2);
22 | ^^^^^^---
23 | |
24 | call expression requires function
041b39d2
XL
25
26error: aborting due to 2 previous errors
27
48663c56 28Some errors have detailed explanations: E0308, E0618.
0531ce1d 29For more information about an error, try `rustc --explain E0308`.