2020-03-11 05:49:00 -05:00
|
|
|
- // MIR for `FOO` before PromoteTemps
|
|
|
|
+ // MIR for `FOO` after PromoteTemps
|
|
|
|
|
|
|
|
static mut FOO: *const &i32 = {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: *const &i32;
|
|
|
|
let mut _1: &[&i32];
|
|
|
|
let mut _2: &[&i32; 1];
|
|
|
|
let _3: [&i32; 1];
|
|
|
|
let mut _4: &i32;
|
|
|
|
let _5: *const i32;
|
|
|
|
+ let mut _6: &[&i32; 1];
|
2020-03-11 05:49:00 -05:00
|
|
|
scope 1 {
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
|
|
|
- StorageLive(_3);
|
|
|
|
- StorageLive(_4);
|
|
|
|
- StorageLive(_5);
|
|
|
|
- _5 = const {alloc3: *const i32};
|
|
|
|
- _4 = &(*_5);
|
|
|
|
- _3 = [move _4];
|
|
|
|
- _2 = &_3;
|
|
|
|
+ _6 = const _;
|
|
|
|
+ _2 = &(*_6);
|
|
|
|
_1 = move _2 as &[&i32] (Pointer(Unsize));
|
|
|
|
- StorageDead(_4);
|
|
|
|
StorageDead(_2);
|
|
|
|
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2];
|
2020-03-11 05:49:00 -05:00
|
|
|
}
|
|
|
|
|
2020-10-02 15:11:24 -05:00
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageDead(_5);
|
|
|
|
- StorageDead(_3);
|
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2020-03-11 05:49:00 -05:00
|
|
|
}
|
2020-10-02 15:11:24 -05:00
|
|
|
|
|
|
|
bb2 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2020-10-02 15:11:24 -05:00
|
|
|
}
|
2020-03-11 05:49:00 -05:00
|
|
|
}
|
2022-02-09 07:21:49 -06:00
|
|
|
-
|
2023-02-16 04:06:59 -06:00
|
|
|
- alloc3 (extern static: X)
|
2020-03-11 05:49:00 -05:00
|
|
|
|