1 // Make sure redundant testing paths in `match` expressions are sorted out.
3 #![feature(exclusive_range_pattern)]
9 // When `(0..=10).contains(x) && !b`, we should jump to the last arm
10 // without testing two other candidates.
20 // START rustc.main.SimplifyCfg-initial.after.mir
23 // switchInt(move _4) -> [false: bb6, otherwise: bb7];
26 // falseEdges -> [real: bb10, imaginary: bb2];
29 // falseEdges -> [real: bb13, imaginary: bb3];
32 // falseEdges -> [real: bb14, imaginary: bb4];
35 // falseEdges -> [real: bb15, imaginary: bb5];
41 // _6 = Le(const 10i32, _1);
42 // switchInt(move _6) -> [false: bb8, otherwise: bb9];
45 // _5 = Lt(_1, const 10i32);
46 // switchInt(move _5) -> [false: bb6, otherwise: bb1];
49 // switchInt(_1) -> [-1i32: bb3, otherwise: bb4];
52 // _7 = Le(_1, const 20i32);
53 // switchInt(move _7) -> [false: bb8, otherwise: bb2];
59 // FakeRead(ForMatchGuard, _8);
60 // switchInt(move _9) -> [false: bb12, otherwise: bb11];
69 // falseEdges -> [real: bb4, imaginary: bb2];
89 // END rustc.main.SimplifyCfg-initial.after.mir