2021-01-12 18:00:00 -06:00
|
|
|
- // MIR for `main` before RemoveStorageMarkers
|
|
|
|
+ // MIR for `main` after RemoveStorageMarkers
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let mut _1: i32;
|
|
|
|
let mut _2: std::ops::Range<i32>;
|
|
|
|
let mut _3: std::ops::Range<i32>;
|
|
|
|
let mut _5: ();
|
|
|
|
let _6: ();
|
|
|
|
let mut _7: std::option::Option<i32>;
|
|
|
|
let mut _8: &mut std::ops::Range<i32>;
|
|
|
|
let mut _9: &mut std::ops::Range<i32>;
|
|
|
|
let mut _10: isize;
|
|
|
|
let mut _11: !;
|
|
|
|
let mut _13: i32;
|
2021-01-12 18:00:00 -06:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug sum => _1;
|
|
|
|
let mut _4: std::ops::Range<i32>;
|
2021-01-12 18:00:00 -06:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug iter => _4;
|
|
|
|
let _12: i32;
|
2021-01-12 18:00:00 -06:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug i => _12;
|
2021-10-25 23:33:12 -05:00
|
|
|
}
|
2021-01-12 18:00:00 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageLive(_1);
|
|
|
|
_1 = const 0_i32;
|
|
|
|
- StorageLive(_2);
|
|
|
|
- StorageLive(_3);
|
|
|
|
_3 = std::ops::Range::<i32> { start: const 0_i32, end: const 10_i32 };
|
2023-06-23 11:53:09 -05:00
|
|
|
_2 = <std::ops::Range<i32> as IntoIterator>::into_iter(move _3) -> [return: bb1, unwind continue];
|
2022-08-02 19:44:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_3);
|
|
|
|
- StorageLive(_4);
|
|
|
|
_4 = move _2;
|
|
|
|
goto -> bb2;
|
2021-01-12 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
2022-08-02 19:44:25 -05:00
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageLive(_6);
|
|
|
|
- StorageLive(_7);
|
|
|
|
- StorageLive(_8);
|
|
|
|
- StorageLive(_9);
|
|
|
|
_9 = &mut _4;
|
|
|
|
_8 = &mut (*_9);
|
2023-06-23 11:53:09 -05:00
|
|
|
_7 = <std::ops::Range<i32> as Iterator>::next(move _8) -> [return: bb3, unwind continue];
|
2021-01-12 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
2022-08-02 19:44:25 -05:00
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_8);
|
|
|
|
_10 = discriminant(_7);
|
|
|
|
switchInt(move _10) -> [0: bb6, 1: bb4, otherwise: bb5];
|
2022-08-02 19:44:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageLive(_12);
|
|
|
|
_12 = ((_7 as Some).0: i32);
|
|
|
|
- StorageLive(_13);
|
|
|
|
_13 = _12;
|
|
|
|
_1 = Add(_1, move _13);
|
|
|
|
- StorageDead(_13);
|
|
|
|
_6 = const ();
|
|
|
|
- StorageDead(_12);
|
|
|
|
- StorageDead(_9);
|
|
|
|
- StorageDead(_7);
|
|
|
|
- StorageDead(_6);
|
|
|
|
_5 = const ();
|
|
|
|
goto -> bb2;
|
2021-01-12 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
2022-08-02 19:44:25 -05:00
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2022-08-02 19:44:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_0 = const ();
|
|
|
|
- StorageDead(_9);
|
|
|
|
- StorageDead(_7);
|
|
|
|
- StorageDead(_6);
|
|
|
|
- StorageDead(_4);
|
|
|
|
- StorageDead(_2);
|
|
|
|
- StorageDead(_1);
|
|
|
|
return;
|
2021-01-12 18:00:00 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|