3 // test matching an enum with uninhabited variants
10 // test an enum where the discriminants don't match the variant indexes
11 // (the optimization should do nothing here)
19 Test1::A(_) => "A(Empty)",
20 Test1::B(_) => "B(Empty)",
32 // START rustc.main.UninhabitedEnumBranching.before.mir
47 // _3 = discriminant(_2);
48 // switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb1];
58 // _1 = const "A(Empty)";
63 // _4 = const "B(Empty)";
74 // _8 = discriminant(_7);
75 // switchInt(move _8) -> [4isize: bb6, otherwise: bb5];
94 // END rustc.main.UninhabitedEnumBranching.before.mir
95 // START rustc.main.UninhabitedEnumBranching.after.mir
103 // let mut _7: Test2;
104 // let mut _8: isize;
110 // _3 = discriminant(_2);
111 // switchInt(move _3) -> bb1;
121 // _1 = const "A(Empty)";
126 // _4 = const "B(Empty)";
137 // _8 = discriminant(_7);
138 // switchInt(move _8) -> [4isize: bb6, otherwise: bb5];
157 // END rustc.main.UninhabitedEnumBranching.after.mir
158 // START rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
161 // let mut _2: Test1;
162 // let mut _3: isize;
166 // let mut _7: Test2;
167 // let mut _8: isize;
173 // _3 = discriminant(_2);
183 // _8 = discriminant(_7);
184 // switchInt(move _8) -> [4isize: bb2, otherwise: bb1];
203 // END rustc.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir