1 error[E0308]: mismatched types
2 --> $DIR/match-type-err-first-arm.rs:8:15
4 LL | fn test_func1(n: i32) -> i32 {
5 | --- expected `i32` because of return type
8 | ^^^ expected `i32`, found `char`
10 help: you can cast a `char` to an `i32`, since a `char` always occupies 4 bytes
12 LL | 12 => 'b' as i32,
15 error[E0308]: `match` arms have incompatible types
16 --> $DIR/match-type-err-first-arm.rs:18:14
18 LL | let x = match n {
21 | | --- this is found to be of type `char`
23 | | ^^ expected `char`, found integer
27 | |_____- `match` arms have incompatible types
29 error[E0308]: `match` arms have incompatible types
30 --> $DIR/match-type-err-first-arm.rs:34:14
32 LL | let x = match n {
39 | | --- this and all prior arms are found to be of type `char`
42 | | ^^ expected `char`, found integer
46 | |_____- `match` arms have incompatible types
48 error[E0308]: `match` arms have incompatible types
49 --> $DIR/match-type-err-first-arm.rs:46:17
51 LL | / match Some(0u32) {
54 | | - this is found to be of type `u32`
57 | | ^^ expected `u32`, found `()`
61 | |_____- `match` arms have incompatible types
63 error: aborting due to 4 previous errors
65 For more information about this error, try `rustc --explain E0308`.