mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
70 lines
1.5 KiB
Diff
70 lines
1.5 KiB
Diff
- // MIR for `main` before ElaborateDrops
|
|
+ // MIR for `main` after ElaborateDrops
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let _1: ();
|
|
let mut _2: S;
|
|
let mut _3: S;
|
|
let mut _4: S;
|
|
+ let mut _5: bool;
|
|
scope 1 {
|
|
debug x => _1;
|
|
}
|
|
|
|
bb0: {
|
|
+ _5 = const false;
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
+ _5 = const true;
|
|
_2 = S;
|
|
StorageLive(_3);
|
|
StorageLive(_4);
|
|
_4 = S;
|
|
_3 = S::id(move _4) -> [return: bb1, unwind: bb4];
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_4);
|
|
+ _5 = const false;
|
|
_1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3];
|
|
}
|
|
|
|
bb2: {
|
|
StorageDead(_3);
|
|
+ _5 = const false;
|
|
StorageDead(_2);
|
|
_0 = const ();
|
|
StorageDead(_1);
|
|
return;
|
|
}
|
|
|
|
bb3 (cleanup): {
|
|
- drop(_3) -> [return: bb5, unwind terminate(cleanup)];
|
|
+ goto -> bb5;
|
|
}
|
|
|
|
bb4 (cleanup): {
|
|
- drop(_4) -> [return: bb5, unwind terminate(cleanup)];
|
|
+ goto -> bb5;
|
|
}
|
|
|
|
bb5 (cleanup): {
|
|
- drop(_2) -> [return: bb6, unwind terminate(cleanup)];
|
|
+ goto -> bb8;
|
|
}
|
|
|
|
bb6 (cleanup): {
|
|
resume;
|
|
+ }
|
|
+
|
|
+ bb7 (cleanup): {
|
|
+ drop(_2) -> [return: bb6, unwind terminate(cleanup)];
|
|
+ }
|
|
+
|
|
+ bb8 (cleanup): {
|
|
+ switchInt(_5) -> [0: bb6, otherwise: bb7];
|
|
}
|
|
}
|
|
|