1 error[E0308]: mismatched types
2 --> $DIR/issue-20862.rs:12:5
5 | - possibly return type missing here?
7 | ^^^^^^^^^ expected (), found closure
9 = note: expected type `()`
10 found type `[closure@$DIR/issue-20862.rs:12:5: 12:14 x:_]`
12 error[E0618]: expected function, found `()`
13 --> $DIR/issue-20862.rs:17:13
15 17 | let x = foo(5)(2);
18 error: aborting due to previous error(s)