2022-05-24 16:57:51 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/add_semicolon_non_block_closure.rs:8:12
|
|
|
|
|
|
|
|
|
LL | fn main() {
|
2023-09-30 14:29:41 -05:00
|
|
|
| - expected `()` because of default return type
|
2022-05-24 16:57:51 -05:00
|
|
|
LL | foo(|| bar())
|
|
|
|
| ^^^^^ expected `()`, found `i32`
|
|
|
|
|
|
|
|
|
help: consider using a semicolon here
|
|
|
|
|
|
|
|
|
LL | foo(|| { bar(); })
|
|
|
|
| + +++
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2022-05-24 16:57:51 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|