fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-20862.rs:2:5 3 | 4LL | fn foo(x: i32) { 5 | - help: a return type might be missing here: `-> _` 6LL | |y| x + y 7 | ^^^^^^^^^ expected `()`, found closure 8 | 9 = note: expected unit type `()` 10 found closure `{closure@$DIR/issue-20862.rs:2:5: 2:8}` 11 12error[E0618]: expected function, found `()` 13 --> $DIR/issue-20862.rs:7:13 14 | 15LL | fn foo(x: i32) { 16 | -------------- `foo` defined here returns `()` 17... 18LL | let x = foo(5)(2); 19 | ^^^^^^--- 20 | | 21 | call expression requires function 22 23error: aborting due to 2 previous errors 24 25Some errors have detailed explanations: E0308, E0618. 26For more information about an error, try `rustc --explain E0308`.