2022-04-16 08:03:14 -05:00
|
|
|
- // MIR for `main` before Derefer
|
|
|
|
+ // MIR for `main` after Derefer
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: bool;
|
|
|
|
let _3: ();
|
|
|
|
let mut _4: &&&&bool;
|
|
|
|
let _5: &&&bool;
|
|
|
|
let _6: &&bool;
|
|
|
|
let _7: &bool;
|
|
|
|
+ let mut _10: &&&bool;
|
|
|
|
+ let mut _11: &&bool;
|
|
|
|
+ let mut _12: &bool;
|
2022-10-15 04:00:32 -05:00
|
|
|
+ let mut _13: &&&bool;
|
|
|
|
+ let mut _14: &&bool;
|
|
|
|
+ let mut _15: &bool;
|
2022-04-16 08:03:14 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug b => _1;
|
|
|
|
let _2: bool;
|
2022-04-16 08:03:14 -05:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug d => _2;
|
|
|
|
let _8: i32;
|
|
|
|
let _9: i32;
|
2022-04-16 08:03:14 -05:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _8;
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
scope 4 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug y => _9;
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
_1 = foo() -> [return: bb1, unwind: bb6];
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_2);
|
|
|
|
_2 = foo() -> [return: bb2, unwind: bb6];
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_3);
|
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_5);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &_1;
|
|
|
|
_6 = &_7;
|
|
|
|
_5 = &_6;
|
|
|
|
_4 = &_5;
|
2022-10-15 04:00:32 -05:00
|
|
|
- PlaceMention((*(*(*(*_4)))));
|
2024-08-18 16:26:34 -05:00
|
|
|
- switchInt(copy (*(*(*(*_4))))) -> [0: bb3, otherwise: bb4];
|
2023-06-06 08:47:00 -05:00
|
|
|
+ _10 = deref_copy (*_4);
|
|
|
|
+ _11 = deref_copy (*_10);
|
|
|
|
+ _12 = deref_copy (*_11);
|
2022-10-15 04:00:32 -05:00
|
|
|
+ PlaceMention((*_12));
|
|
|
|
+ _13 = deref_copy (*_4);
|
|
|
|
+ _14 = deref_copy (*_13);
|
|
|
|
+ _15 = deref_copy (*_14);
|
2024-08-18 16:26:34 -05:00
|
|
|
+ switchInt(copy (*_15)) -> [0: bb3, otherwise: bb4];
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_3 = const ();
|
|
|
|
goto -> bb5;
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_8);
|
|
|
|
_8 = const 5_i32;
|
|
|
|
_3 = const ();
|
|
|
|
StorageDead(_8);
|
|
|
|
goto -> bb5;
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_3);
|
|
|
|
StorageLive(_9);
|
|
|
|
_9 = const 42_i32;
|
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_9);
|
|
|
|
StorageDead(_2);
|
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
2023-06-08 02:34:53 -05:00
|
|
|
|
|
|
|
bb6 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2023-06-08 02:34:53 -05:00
|
|
|
}
|
2022-04-16 08:03:14 -05:00
|
|
|
}
|
|
|
|
|