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