1 error[E0308]: `if` and `else` have incompatible types
2 --> $DIR/if-else-type-mismatch.rs:5:9
7 | | ---- expected because of this
10 | | ^^^^ expected `i32`, found `u32`
12 | |_____- `if` and `else` have incompatible types
14 error[E0308]: `if` and `else` have incompatible types
15 --> $DIR/if-else-type-mismatch.rs:8:38
17 LL | let _ = if true { 42i32 } else { 42u32 };
18 | ----- ^^^^^ expected `i32`, found `u32`
20 | expected because of this
22 error[E0308]: `if` and `else` have incompatible types
23 --> $DIR/if-else-type-mismatch.rs:13:9
25 LL | let _ = if true {
30 | | | help: consider removing this semicolon
31 | | expected because of this
34 | | ^^^^ expected `()`, found `u32`
36 | |_____- `if` and `else` have incompatible types
38 error[E0308]: `if` and `else` have incompatible types
39 --> $DIR/if-else-type-mismatch.rs:19:9
41 LL | let _ = if true {
44 | | ---- expected because of this
49 | | | help: consider removing this semicolon
50 | | expected `u32`, found `()`
52 | |_____- `if` and `else` have incompatible types
54 error[E0308]: `if` and `else` have incompatible types
55 --> $DIR/if-else-type-mismatch.rs:25:9
57 LL | let _ = if true {
60 | | ----- expected because of this
63 | | ^^^^ expected `()`, found `u32`
65 | |_____- `if` and `else` have incompatible types
67 error[E0308]: `if` and `else` have incompatible types
68 --> $DIR/if-else-type-mismatch.rs:31:9
70 LL | let _ = if true {
73 | | ---- expected because of this
76 | | ^^^^^^ expected `i32`, found `()`
78 | |_____- `if` and `else` have incompatible types
80 error[E0308]: `if` and `else` have incompatible types
81 --> $DIR/if-else-type-mismatch.rs:37:9
83 LL | let _ = if true {
84 | _____________________-
87 | |_____- expected because of this
89 | ^^^^^ expected `()`, found `u32`
91 error[E0308]: `if` and `else` have incompatible types
92 --> $DIR/if-else-type-mismatch.rs:42:12
94 LL | let _ = if true {
95 | ------- `if` and `else` have incompatible types
97 | ----- expected because of this
102 | |_____^ expected `i32`, found `()`
104 error: aborting due to 8 previous errors
106 For more information about this error, try `rustc --explain E0308`.