]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/empty-trailing-stmt.stderr
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / macros / empty-trailing-stmt.stderr
1 error[E0308]: mismatched types
2   --> $DIR/empty-trailing-stmt.rs:6:7
3    |
4 LL |     { true }
5    |       ^^^^ expected `()`, found `bool`
6    |
7 help: you might have meant to return this value
8    |
9 LL |     { return true; }
10    |       ^^^^^^     ^
11
12 error[E0308]: mismatched types
13   --> $DIR/empty-trailing-stmt.rs:5:13
14    |
15 LL | fn foo() -> bool {
16    |    ---      ^^^^ expected `bool`, found `()`
17    |    |
18    |    implicitly returns `()` as its body has no tail or `return` expression
19
20 error: aborting due to 2 previous errors
21
22 For more information about this error, try `rustc --explain E0308`.