1 error[E0308]: mismatched types
2 --> $DIR/return-closures.rs:3:5
5 | - help: try adding a return type: `-> impl for<'a> Fn(&'a i32) -> i32`
8 | ^^^^^^^^^^^^^^ expected `()`, found closure
10 = note: expected unit type `()`
11 found closure `[closure@$DIR/return-closures.rs:3:5: 3:14]`
13 error[E0308]: mismatched types
14 --> $DIR/return-closures.rs:9:5
16 LL | fn bar(i: impl Sized) {
17 | - help: a return type might be missing here: `-> _`
20 | ^^^^ expected `()`, found closure
22 = note: expected unit type `()`
23 found closure `[closure@$DIR/return-closures.rs:9:5: 9:7]`
25 error: aborting due to 2 previous errors
27 For more information about this error, try `rustc --explain E0308`.