6 fn test_func1(n: i32) -> i32 { //~ NOTE expected `i32` because of return type
9 //~^ ERROR mismatched types
10 //~| NOTE expected i32, found char
15 fn test_func2(n: i32) -> i32 {
16 let x = match n { //~ NOTE `match` arms have incompatible types
17 12 => 'b', //~ NOTE this is found to be of type `char`
19 //~^ ERROR match arms have incompatible types
20 //~| NOTE expected char, found integer
21 //~| NOTE expected type `char`
26 fn test_func3(n: i32) -> i32 {
27 let x = match n { //~ NOTE `match` arms have incompatible types
34 //~^ NOTE this and all prior arms are found to be of type `char`
36 //~^ ERROR match arms have incompatible types
37 //~| NOTE expected char, found integer
38 //~| NOTE expected type `char`
44 match Some(0u32) { //~ NOTE `match` arms have incompatible types
46 x //~ NOTE this is found to be of type `u32`
49 //~^ ERROR match arms have incompatible types
50 //~| NOTE expected u32, found ()
51 //~| NOTE expected type `u32`