]> git.proxmox.com Git - rustc.git/blob - 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
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 x:_]`
11
12 error[E0618]: expected function, found `()`
13 --> $DIR/issue-20862.rs:7:13
14 |
15 LL | / fn foo(x: i32) {
16 LL | | |y| x + y
17 LL | |
18 LL | | }
19 | |_- `foo` defined here returns `()`
20 ...
21 LL | let x = foo(5)(2);
22 | ^^^^^^---
23 | |
24 | call expression requires function
25
26 error: aborting due to 2 previous errors
27
28 Some errors have detailed explanations: E0308, E0618.
29 For more information about an error, try `rustc --explain E0308`.