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 {
34 | | ------ expected because of this
37 | | ^^^^^ expected (), found u32
39 | |_____- if and else have incompatible types
41 = note: expected type `()`
44 error[E0308]: if and else have incompatible types
45 --> $DIR/if-else-type-mismatch.rs:19:9
47 LL | let _ = if true {
50 | | ----- expected because of this
53 | | ^^^^^^ expected i32, found ()
55 | |_____- if and else have incompatible types
57 = note: expected type `i32`
60 error[E0308]: if and else have incompatible types
61 --> $DIR/if-else-type-mismatch.rs:25:9
63 LL | let _ = if true {
64 | _____________________-
67 | |_____- expected because of this
69 | ^^^^^ expected (), found u32
71 = note: expected type `()`
74 error[E0308]: if and else have incompatible types
75 --> $DIR/if-else-type-mismatch.rs:30:12
77 LL | let _ = if true {
78 | ------- if and else have incompatible types
80 | ----- expected because of this
85 | |_____^ expected i32, found ()
87 = note: expected type `i32`
90 error: aborting due to 6 previous errors
92 For more information about this error, try `rustc --explain E0308`.