fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1- // MIR for `main` before ConstProp 2+ // MIR for `main` after ConstProp 3 4 fn main() -> () { 5 let mut _0: (); 6 let _1: u32; 7 let mut _2: (u32, bool); 8 scope 1 { 9 debug x => _1; 10 } 11 12 bb0: { 13 StorageLive(_1); 14- _2 = CheckedAdd(const 1_u32, const 1_u32); 15- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> [success: bb1, unwind unreachable]; 16+ _2 = const (2_u32, false); 17+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> [success: bb1, unwind unreachable]; 18 } 19 20 bb1: { 21- _1 = move (_2.0: u32); 22+ _1 = const 2_u32; 23 _0 = const (); 24 StorageDead(_1); 25 return; 26 } 27+ } 28+ 29+ alloc3 (size: 8, align: 4) { 30+ 02 00 00 00 00 __ __ __ │ .....░░░ 31 } 32