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 = note: expected type `i32`
17 error[E0308]: if and else have incompatible types
18 --> $DIR/if-else-type-mismatch.rs:8:38
20 LL | let _ = if true { 42i32 } else { 42u32 };
21 | ----- ^^^^^ expected i32, found u32
23 | expected because of this
25 = note: expected type `i32`
28 error[E0308]: if and else have incompatible types
29 --> $DIR/if-else-type-mismatch.rs:13:9
31 LL | let _ = if true {
36 | | | help: consider removing this semicolon
37 | | expected because of this
40 | | ^^^^ expected (), found u32
42 | |_____- if and else have incompatible types
44 = note: expected type `()`
47 error[E0308]: if and else have incompatible types
48 --> $DIR/if-else-type-mismatch.rs:19:9
50 LL | let _ = if true {
53 | | ---- expected because of this
58 | | | help: consider removing this semicolon
59 | | expected u32, found ()
61 | |_____- if and else have incompatible types
63 = note: expected type `u32`
66 error[E0308]: if and else have incompatible types
67 --> $DIR/if-else-type-mismatch.rs:25:9
69 LL | let _ = if true {
72 | | ----- expected because of this
75 | | ^^^^ expected (), found u32
77 | |_____- if and else have incompatible types
79 = note: expected type `()`
82 error[E0308]: if and else have incompatible types
83 --> $DIR/if-else-type-mismatch.rs:31:9
85 LL | let _ = if true {
88 | | ---- expected because of this
91 | | ^^^^^^ expected i32, found ()
93 | |_____- if and else have incompatible types
95 = note: expected type `i32`
98 error[E0308]: if and else have incompatible types
99 --> $DIR/if-else-type-mismatch.rs:37:9
101 LL | let _ = if true {
102 | _____________________-
105 | |_____- expected because of this
107 | ^^^^^ expected (), found u32
109 = note: expected type `()`
112 error[E0308]: if and else have incompatible types
113 --> $DIR/if-else-type-mismatch.rs:42:12
115 LL | let _ = if true {
116 | ------- if and else have incompatible types
118 | ----- expected because of this
123 | |_____^ expected i32, found ()
125 = note: expected type `i32`
128 error: aborting due to 8 previous errors
130 For more information about this error, try `rustc --explain E0308`.