]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/add_semicolon_non_block_closure.stderr
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / closures / add_semicolon_non_block_closure.stderr
1 error[E0308]: mismatched types
2   --> $DIR/add_semicolon_non_block_closure.rs:8:12
3    |
4 LL | fn main() {
5    |           - expected `()` because of default return type
6 LL |     foo(|| bar())
7    |            ^^^^^ expected `()`, found `i32`
8    |
9 help: consider using a semicolon here
10    |
11 LL |     foo(|| { bar(); })
12    |            +      +++
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0308`.