]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | error[E0317]: `if` may be missing an `else` clause |
0731742a | 2 | --> $DIR/if-without-else-result.rs:2:13 |
b7449926 XL |
3 | | |
4 | LL | let a = if true { true }; | |
532ac7d7 XL |
5 | | ^^^^^^^^^^----^^ |
6 | | | | | |
7 | | | found here | |
60c5eb7d | 8 | | expected `()`, found `bool` |
b7449926 | 9 | | |
532ac7d7 XL |
10 | = note: `if` expressions without `else` evaluate to `()` |
11 | = help: consider adding an `else` block that evaluates to the expected type | |
b7449926 XL |
12 | |
13 | error: aborting due to previous error | |
14 | ||
15 | For more information about this error, try `rustc --explain E0317`. |