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 mut _1: i32; 7 8 bb0: { 9 StorageLive(_1); 10 _1 = const 1_i32; 11- switchInt(_1) -> [1: bb2, otherwise: bb1]; 12+ switchInt(const 1_i32) -> [1: bb2, otherwise: bb1]; 13 } 14 15 bb1: { 16 _0 = foo(const -1_i32) -> [return: bb3, unwind unreachable]; 17 } 18 19 bb2: { 20 _0 = foo(const 0_i32) -> [return: bb3, unwind unreachable]; 21 } 22 23 bb3: { 24 StorageDead(_1); 25 return; 26 } 27 } 28