1 // unit-test: MatchBranchSimplification
4 // EMIT_MIR matches_u8.exhaustive_match.MatchBranchSimplification.diff
5 // EMIT_MIR matches_u8.exhaustive_match_i8.MatchBranchSimplification.diff
13 pub fn exhaustive_match(e: E) -> u8 {
21 pub fn exhaustive_match_i8(e: E) -> i8 {
29 assert_eq!(exhaustive_match(E::A), 0);
30 assert_eq!(exhaustive_match(E::B), 1);
32 assert_eq!(exhaustive_match_i8(E::A), 0);
33 assert_eq!(exhaustive_match_i8(E::B), 1);