]> git.lizzy.rs Git - rust.git/blob - src/test/ui/if/if-let-arm-types.stderr
Rollup merge of #59093 - Zoxc:no-prealloc, r=michaelwoerister
[rust.git] / src / test / ui / if / if-let-arm-types.stderr
1 error[E0308]: `if let` arms have incompatible types
2   --> $DIR/if-let-arm-types.rs:6:9
3    |
4 LL | /     if let Some(b) = None {
5 LL | |
6 LL | |         ()
7 LL | |     } else {
8 LL | |         1
9    | |         ^ expected (), found integer
10 LL | |     };
11    | |_____- `if let` arms have incompatible types
12    |
13    = note: expected type `()`
14               found type `{integer}`
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.