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: bb7, otherwise: bb8];
26 // falseEdges -> [real: bb12, imaginary: bb2];
29 // falseEdges -> [real: bb13, imaginary: bb3];
32 // falseEdges -> [real: bb14, imaginary: bb4];
35 // falseEdges -> [real: bb15, imaginary: bb5];
41 // falseEdges -> [real: bb4, imaginary: bb2];
44 // _6 = Le(const 10i32, _1);
45 // switchInt(move _6) -> [false: bb9, otherwise: bb10];
48 // _5 = Lt(_1, const 10i32);
49 // switchInt(move _5) -> [false: bb7, otherwise: bb1];
52 // switchInt(_1) -> [-1i32: bb3, otherwise: bb4];
55 // _7 = Le(_1, const 20i32);
56 // switchInt(move _7) -> [false: bb9, otherwise: bb2];
66 // FakeRead(ForMatchGuard, _8);
67 // switchInt(move _9) -> [false: bb6, otherwise: bb11];
88 // END rustc.main.SimplifyCfg-initial.after.mir