mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
148 lines
3.1 KiB
Diff
148 lines
3.1 KiB
Diff
- // MIR for `main` before ElaborateDrops
|
|
+ // MIR for `main` after ElaborateDrops
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let _1: E;
|
|
let mut _2: bool;
|
|
let mut _3: E;
|
|
let mut _4: K;
|
|
let mut _5: isize;
|
|
+ let mut _7: bool;
|
|
+ let mut _8: bool;
|
|
+ let mut _9: isize;
|
|
+ let mut _10: isize;
|
|
scope 1 {
|
|
debug e => _1;
|
|
scope 2 {
|
|
debug _k => _6;
|
|
let _6: K;
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
+ _7 = const false;
|
|
+ _8 = const false;
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
_2 = cond() -> [return: bb1, unwind: bb11];
|
|
}
|
|
|
|
bb1: {
|
|
switchInt(move _2) -> [0: bb8, otherwise: bb2];
|
|
}
|
|
|
|
bb2: {
|
|
StorageLive(_3);
|
|
StorageLive(_4);
|
|
_4 = K;
|
|
_3 = E::F(move _4);
|
|
StorageDead(_4);
|
|
- drop(_1) -> [return: bb3, unwind: bb4];
|
|
+ goto -> bb3;
|
|
}
|
|
|
|
bb3: {
|
|
+ _7 = const true;
|
|
+ _8 = const true;
|
|
_1 = move _3;
|
|
- drop(_3) -> [return: bb5, unwind: bb11];
|
|
+ goto -> bb5;
|
|
}
|
|
|
|
bb4 (cleanup): {
|
|
+ _7 = const true;
|
|
+ _8 = const true;
|
|
_1 = move _3;
|
|
- drop(_3) -> [return: bb11, unwind terminate(cleanup)];
|
|
+ goto -> bb11;
|
|
}
|
|
|
|
bb5: {
|
|
StorageDead(_3);
|
|
PlaceMention(_1);
|
|
_5 = discriminant(_1);
|
|
switchInt(move _5) -> [0: bb6, otherwise: bb7];
|
|
}
|
|
|
|
bb6: {
|
|
StorageLive(_6);
|
|
_6 = move ((_1 as F).0: K);
|
|
_0 = const ();
|
|
StorageDead(_6);
|
|
goto -> bb9;
|
|
}
|
|
|
|
bb7: {
|
|
_0 = const ();
|
|
goto -> bb9;
|
|
}
|
|
|
|
bb8: {
|
|
_0 = const ();
|
|
goto -> bb9;
|
|
}
|
|
|
|
bb9: {
|
|
StorageDead(_2);
|
|
- drop(_1) -> [return: bb10, unwind continue];
|
|
+ goto -> bb19;
|
|
}
|
|
|
|
bb10: {
|
|
+ _7 = const false;
|
|
+ _8 = const false;
|
|
StorageDead(_1);
|
|
return;
|
|
}
|
|
|
|
bb11 (cleanup): {
|
|
- drop(_1) -> [return: bb12, unwind terminate(cleanup)];
|
|
+ goto -> bb12;
|
|
}
|
|
|
|
bb12 (cleanup): {
|
|
resume;
|
|
+ }
|
|
+
|
|
+ bb13: {
|
|
+ _7 = const false;
|
|
+ goto -> bb10;
|
|
+ }
|
|
+
|
|
+ bb14 (cleanup): {
|
|
+ drop(((_1 as F).0: K)) -> [return: bb12, unwind terminate(cleanup)];
|
|
+ }
|
|
+
|
|
+ bb15 (cleanup): {
|
|
+ switchInt(copy _7) -> [0: bb12, otherwise: bb14];
|
|
+ }
|
|
+
|
|
+ bb16: {
|
|
+ drop(_1) -> [return: bb13, unwind: bb12];
|
|
+ }
|
|
+
|
|
+ bb17 (cleanup): {
|
|
+ drop(_1) -> [return: bb12, unwind terminate(cleanup)];
|
|
+ }
|
|
+
|
|
+ bb18: {
|
|
+ _9 = discriminant(_1);
|
|
+ switchInt(move _9) -> [0: bb13, otherwise: bb16];
|
|
+ }
|
|
+
|
|
+ bb19: {
|
|
+ switchInt(copy _7) -> [0: bb13, otherwise: bb18];
|
|
+ }
|
|
+
|
|
+ bb20 (cleanup): {
|
|
+ _10 = discriminant(_1);
|
|
+ switchInt(move _10) -> [0: bb15, otherwise: bb17];
|
|
+ }
|
|
+
|
|
+ bb21 (cleanup): {
|
|
+ switchInt(copy _7) -> [0: bb12, otherwise: bb20];
|
|
}
|
|
}
|
|
|