2020-04-02 16:09:01 -05:00
|
|
|
// MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
|
|
|
|
|
|
|
|
fn main() -> () {
|
2022-07-27 13:47:42 -05:00
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +0:11
|
|
|
|
let _1: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
|
|
|
|
let mut _2: Test1; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
|
|
|
|
let mut _3: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+2:9: +2:20
|
|
|
|
let _4: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
|
|
|
|
let _5: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
|
|
|
|
let _6: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
|
|
|
|
let mut _7: Test2; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
|
|
|
|
let mut _8: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+8:9: +8:17
|
|
|
|
let _9: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
|
2020-04-02 16:09:01 -05:00
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
|
2023-01-25 12:34:19 -06:00
|
|
|
_2 = Test1::C; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
|
2022-07-27 13:47:42 -05:00
|
|
|
_3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
|
2022-12-03 18:03:27 -06:00
|
|
|
switchInt(move _3) -> [2: bb1, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +1:19
|
2022-07-26 08:17:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
|
|
|
|
_5 = const "C"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24
|
2022-05-06 03:58:54 -05:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2022-07-27 13:47:42 -05:00
|
|
|
_1 = &(*_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
|
|
|
|
StorageDead(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:23: +4:24
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
|
|
|
|
StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
|
|
|
|
StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
|
|
|
|
StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
|
2023-01-25 12:34:19 -06:00
|
|
|
_7 = Test2::D; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
|
2022-07-27 13:47:42 -05:00
|
|
|
_8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
|
2023-02-24 15:32:10 -06:00
|
|
|
switchInt(move _8) -> [4: bb4, 5: bb3, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +7:19
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb2: {
|
|
|
|
unreachable; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
|
|
|
|
_9 = const "E"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24
|
2022-05-06 03:58:54 -05:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2022-07-27 13:47:42 -05:00
|
|
|
_6 = &(*_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
|
|
|
|
StorageDead(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
|
2023-02-24 15:32:10 -06:00
|
|
|
goto -> bb5; // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2022-07-26 08:17:02 -05:00
|
|
|
bb4: {
|
2022-07-27 13:47:42 -05:00
|
|
|
_6 = const "D"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
|
2020-04-02 16:09:01 -05:00
|
|
|
// mir::Constant
|
|
|
|
// + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24
|
2022-05-06 03:58:54 -05:00
|
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
2023-02-24 15:32:10 -06:00
|
|
|
goto -> bb5; // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
|
2023-02-24 15:32:10 -06:00
|
|
|
bb5: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
|
|
|
|
StorageDead(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
|
|
|
|
_0 = const (); // scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +11:2
|
|
|
|
return; // scope 0 at $DIR/uninhabited_enum_branching.rs:+11:2: +11:2
|
2020-04-02 16:09:01 -05:00
|
|
|
}
|
|
|
|
}
|