mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
61 lines
1.1 KiB
Rust
61 lines
1.1 KiB
Rust
// MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let _1: &str;
|
|
let mut _2: Test1;
|
|
let mut _3: isize;
|
|
let _4: &str;
|
|
let _5: &str;
|
|
let _6: &str;
|
|
let mut _7: Test2;
|
|
let mut _8: isize;
|
|
let _9: &str;
|
|
|
|
bb0: {
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
_2 = Test1::C;
|
|
_3 = discriminant(_2);
|
|
switchInt(move _3) -> [2: bb1, otherwise: bb2];
|
|
}
|
|
|
|
bb1: {
|
|
StorageLive(_5);
|
|
_5 = const "C";
|
|
_1 = &(*_5);
|
|
StorageDead(_5);
|
|
StorageDead(_2);
|
|
StorageDead(_1);
|
|
StorageLive(_6);
|
|
StorageLive(_7);
|
|
_7 = Test2::D;
|
|
_8 = discriminant(_7);
|
|
switchInt(move _8) -> [4: bb4, 5: bb3, otherwise: bb2];
|
|
}
|
|
|
|
bb2: {
|
|
unreachable;
|
|
}
|
|
|
|
bb3: {
|
|
StorageLive(_9);
|
|
_9 = const "E";
|
|
_6 = &(*_9);
|
|
StorageDead(_9);
|
|
goto -> bb5;
|
|
}
|
|
|
|
bb4: {
|
|
_6 = const "D";
|
|
goto -> bb5;
|
|
}
|
|
|
|
bb5: {
|
|
StorageDead(_7);
|
|
StorageDead(_6);
|
|
_0 = const ();
|
|
return;
|
|
}
|
|
}
|