1 // Test that simple or-patterns don't get expanded to exponentially large CFGs
3 // ignore-tidy-linelength
5 #![feature(or_patterns)]
7 fn match_tuple(x: (u32, bool, Option<i32>, u32)) -> u32 {
9 (y @ (1 | 4), true | false, Some(1 | 8) | None, z @ (6..=9 | 13..=16)) => y ^ z,
18 // START rustc.match_tuple.SimplifyCfg-initial.after.mir
24 // FakeRead(ForMatchedPlace, _1);
25 // switchInt((_1.0: u32)) -> [1u32: bb2, 4u32: bb2, otherwise: bb1];
32 // _2 = discriminant((_1.2: std::option::Option<i32>));
33 // switchInt(move _2) -> [0isize: bb4, 1isize: bb3, otherwise: bb1];
36 // switchInt((((_1.2: std::option::Option<i32>) as Some).0: i32)) -> [1i32: bb4, 8i32: bb4, otherwise: bb1];
39 // _5 = Le(const 6u32, (_1.3: u32));
40 // switchInt(move _5) -> [false: bb6, otherwise: bb5];
43 // _6 = Le((_1.3: u32), const 9u32);
44 // switchInt(move _6) -> [false: bb6, otherwise: bb8];
47 // _3 = Le(const 13u32, (_1.3: u32));
48 // switchInt(move _3) -> [false: bb1, otherwise: bb7];
51 // _4 = Le((_1.3: u32), const 16u32);
52 // switchInt(move _4) -> [false: bb1, otherwise: bb8];
55 // falseEdges -> [real: bb9, imaginary: bb1];
66 // _0 = BitXor(move _9, move _10);
76 // END rustc.match_tuple.SimplifyCfg-initial.after.mir