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 help: change the type of the numeric literal from `u32` to `i32`
19 error[E0308]: `if` and `else` have incompatible types
20 --> $DIR/if-else-type-mismatch.rs:8:38
22 LL | let _ = if true { 42i32 } else { 42u32 };
23 | ----- ^^^^^ expected `i32`, found `u32`
25 | expected because of this
27 help: change the type of the numeric literal from `u32` to `i32`
29 LL | let _ = if true { 42i32 } else { 42i32 };
32 error[E0308]: `if` and `else` have incompatible types
33 --> $DIR/if-else-type-mismatch.rs:13:9
35 LL | let _ = if true {
40 | | | help: consider removing this semicolon
41 | | expected because of this
44 | | ^^^^ expected `()`, found `u32`
46 | |_____- `if` and `else` have incompatible types
48 error[E0308]: `if` and `else` have incompatible types
49 --> $DIR/if-else-type-mismatch.rs:19:9
51 LL | let _ = if true {
54 | | ---- expected because of this
59 | | | help: consider removing this semicolon
60 | | expected `u32`, found `()`
62 | |_____- `if` and `else` have incompatible types
64 error[E0308]: `if` and `else` have incompatible types
65 --> $DIR/if-else-type-mismatch.rs:25:9
67 LL | let _ = if true {
70 | | ----- expected because of this
73 | | ^^^^ expected `()`, found `u32`
75 | |_____- `if` and `else` have incompatible types
77 error[E0308]: `if` and `else` have incompatible types
78 --> $DIR/if-else-type-mismatch.rs:31:9
80 LL | let _ = if true {
83 | | ---- expected because of this
86 | | ^^^^^^ expected `i32`, found `()`
88 | |_____- `if` and `else` have incompatible types
90 error[E0308]: `if` and `else` have incompatible types
91 --> $DIR/if-else-type-mismatch.rs:37:9
93 LL | let _ = if true {
94 | _____________________-
97 | |_____- expected because of this
99 | ^^^^^ expected `()`, found `u32`
101 error[E0308]: `if` and `else` have incompatible types
102 --> $DIR/if-else-type-mismatch.rs:42:12
104 LL | let _ = if true {
105 | ------- `if` and `else` have incompatible types
107 | ----- expected because of this
112 | |_____^ expected `i32`, found `()`
114 error: aborting due to 8 previous errors
116 For more information about this error, try `rustc --explain E0308`.