2024-06-10 01:47:41 -05:00
|
|
|
- // MIR for `main` before SingleUseConsts
|
|
|
|
+ // MIR for `main` after SingleUseConsts
|
2020-05-30 14:02:32 -05:00
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: u8;
|
2023-10-18 12:30:28 -05:00
|
|
|
let mut _5: u8;
|
|
|
|
let mut _6: u8;
|
|
|
|
let mut _7: u8;
|
|
|
|
let mut _8: u8;
|
|
|
|
let mut _14: u32;
|
|
|
|
let mut _15: u32;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug x => _1;
|
|
|
|
+ debug x => const 1_u8;
|
|
|
|
let _2: u8;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug y => _2;
|
|
|
|
+ debug y => const 2_u8;
|
|
|
|
let _3: u8;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug z => _3;
|
|
|
|
+ debug z => const 3_u8;
|
|
|
|
let _4: u8;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 4 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug sum => _4;
|
|
|
|
+ debug sum => const 6_u8;
|
2023-10-18 12:30:28 -05:00
|
|
|
let _9: &str;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 5 {
|
2023-10-18 12:30:28 -05:00
|
|
|
- debug s => _9;
|
2023-06-06 08:47:00 -05:00
|
|
|
+ debug s => const "hello, world!";
|
2023-10-18 12:30:28 -05:00
|
|
|
let _10: (bool, bool, u32);
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 6 {
|
2023-10-18 12:30:28 -05:00
|
|
|
debug f => _10;
|
|
|
|
let _11: std::option::Option<u16>;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 7 {
|
2023-09-20 16:43:33 -05:00
|
|
|
- debug o => _11;
|
|
|
|
+ debug o => const Option::<u16>::Some(99_u16);
|
2023-10-18 12:30:28 -05:00
|
|
|
let _12: Point;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 8 {
|
2023-10-18 12:30:28 -05:00
|
|
|
- debug p => _12;
|
|
|
|
+ debug p => const Point {{ x: 32_u32, y: 32_u32 }};
|
|
|
|
let _13: u32;
|
2020-05-30 14:02:32 -05:00
|
|
|
scope 9 {
|
2023-10-18 12:30:28 -05:00
|
|
|
- debug a => _13;
|
2023-06-06 08:47:00 -05:00
|
|
|
+ debug a => const 64_u32;
|
2020-05-30 14:02:32 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
2024-06-10 01:47:41 -05:00
|
|
|
- _1 = const 1_u8;
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
2024-06-10 01:47:41 -05:00
|
|
|
- _2 = const 2_u8;
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
2024-06-10 01:47:41 -05:00
|
|
|
- _3 = const 3_u8;
|
|
|
|
+ nop;
|
|
|
|
+ nop;
|
|
|
|
+ nop;
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_4);
|
2023-09-16 12:13:30 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
StorageLive(_6);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _6 = const 1_u8;
|
|
|
|
+ nop;
|
2023-09-16 12:13:30 -05:00
|
|
|
StorageLive(_7);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _7 = const 2_u8;
|
|
|
|
- _5 = const 3_u8;
|
|
|
|
+ nop;
|
|
|
|
+ nop;
|
2023-09-16 12:13:30 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_8);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _8 = const 3_u8;
|
|
|
|
- _4 = const 6_u8;
|
|
|
|
+ nop;
|
|
|
|
+ nop;
|
2023-09-16 12:13:30 -05:00
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_5);
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_9);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _9 = const "hello, world!";
|
|
|
|
+ nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_10);
|
|
|
|
_10 = (const true, const false, const 123_u32);
|
|
|
|
StorageLive(_11);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _11 = const Option::<u16>::Some(99_u16);
|
|
|
|
+ nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_12);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _12 = const Point {{ x: 32_u32, y: 32_u32 }};
|
|
|
|
+ nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_13);
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
2024-06-10 01:47:41 -05:00
|
|
|
- _14 = const 32_u32;
|
|
|
|
+ nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageLive(_15);
|
2024-06-10 01:47:41 -05:00
|
|
|
- _15 = const 32_u32;
|
|
|
|
- _13 = const 64_u32;
|
|
|
|
+ nop;
|
|
|
|
+ nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
StorageDead(_15);
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
2023-10-18 12:30:28 -05:00
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_13);
|
|
|
|
StorageDead(_12);
|
|
|
|
StorageDead(_11);
|
|
|
|
StorageDead(_10);
|
|
|
|
StorageDead(_9);
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_4);
|
2023-09-20 16:43:33 -05:00
|
|
|
nop;
|
|
|
|
nop;
|
|
|
|
nop;
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2020-05-30 14:02:32 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-14 18:05:22 -05:00
|
|
|
ALLOC0 (size: 8, align: 4) { .. }
|
2023-09-17 04:35:06 -05:00
|
|
|
|
2024-06-14 18:05:22 -05:00
|
|
|
ALLOC1 (size: 4, align: 2) { .. }
|
2023-09-20 16:43:33 -05:00
|
|
|
|