diff options
| author | DianQK <dianqk@dianqk.net> | 2024-02-20 21:55:46 +0800 |
|---|---|---|
| committer | DianQK <dianqk@dianqk.net> | 2024-04-08 19:00:57 +0800 |
| commit | e752af765ea04ba663d82524cfdcc2b7b6cb58aa (patch) | |
| tree | e73c40cde72bee2575b9e6f087fc815b1988a0b8 /tests/mir-opt/matches_reduce_branches.rs | |
| parent | 1f061f47e2903e90651f63368e3ff0aebac8e3e6 (diff) | |
| download | rust-e752af765ea04ba663d82524cfdcc2b7b6cb58aa.tar.gz rust-e752af765ea04ba663d82524cfdcc2b7b6cb58aa.zip | |
Transforms a match containing negative numbers into an assignment statement as well
Diffstat (limited to 'tests/mir-opt/matches_reduce_branches.rs')
| -rw-r--r-- | tests/mir-opt/matches_reduce_branches.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/mir-opt/matches_reduce_branches.rs b/tests/mir-opt/matches_reduce_branches.rs index d51dd7c5873..ca3e5f747d1 100644 --- a/tests/mir-opt/matches_reduce_branches.rs +++ b/tests/mir-opt/matches_reduce_branches.rs @@ -204,7 +204,9 @@ enum EnumAi8 { // EMIT_MIR matches_reduce_branches.match_i8_i16.MatchBranchSimplification.diff fn match_i8_i16(i: EnumAi8) -> i16 { // CHECK-LABEL: fn match_i8_i16( - // CHECK: switchInt + // CHECK-NOT: switchInt + // CHECK: _0 = _3 as i16 (IntToInt); + // CHECH: return match i { EnumAi8::A => -1, EnumAi8::B => 2, @@ -233,7 +235,9 @@ enum EnumAi16 { // EMIT_MIR matches_reduce_branches.match_i16_i8.MatchBranchSimplification.diff fn match_i16_i8(i: EnumAi16) -> i8 { // CHECK-LABEL: fn match_i16_i8( - // CHECK: switchInt + // CHECK-NOT: switchInt + // CHECK: _0 = _3 as i8 (IntToInt); + // CHECH: return match i { EnumAi16::A => -1, EnumAi16::B => 2, |
