]> git.proxmox.com Git - rustc.git/blame - src/test/ui/if/if-without-else-result.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / if / if-without-else-result.stderr
CommitLineData
dfeec247 1error[E0317]: `if` may be missing an `else` clause
0731742a 2 --> $DIR/if-without-else-result.rs:2:13
b7449926
XL
3 |
4LL | 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
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0317`.