fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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