1 - // MIR for `foo` before CopyProp
2 + // MIR for `foo` after CopyProp
5 let mut _0: i32; // return place in scope 0 at $DIR/branch.rs:+0:13: +0:16
6 let _1: i32; // in scope 0 at $DIR/branch.rs:+1:9: +1:10
7 let mut _3: bool; // in scope 0 at $DIR/branch.rs:+3:16: +3:22
8 let _4: i32; // in scope 0 at $DIR/branch.rs:+6:9: +6:14
10 debug x => _1; // in scope 1 at $DIR/branch.rs:+1:9: +1:10
11 let _2: i32; // in scope 1 at $DIR/branch.rs:+3:9: +3:10
13 debug y => _2; // in scope 2 at $DIR/branch.rs:+3:9: +3:10
18 StorageLive(_1); // scope 0 at $DIR/branch.rs:+1:9: +1:10
19 _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:+1:13: +1:18
21 // + span: $DIR/branch.rs:13:13: 13:16
22 // + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
26 StorageLive(_2); // scope 1 at $DIR/branch.rs:+3:9: +3:10
27 StorageLive(_3); // scope 1 at $DIR/branch.rs:+3:16: +3:22
28 _3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:+3:16: +3:22
30 // + span: $DIR/branch.rs:15:16: 15:20
31 // + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
35 switchInt(move _3) -> [0: bb4, otherwise: bb3]; // scope 1 at $DIR/branch.rs:+3:16: +3:22
39 _2 = _1; // scope 1 at $DIR/branch.rs:+4:9: +4:10
40 goto -> bb6; // scope 1 at $DIR/branch.rs:+3:13: +8:6
44 StorageLive(_4); // scope 1 at $DIR/branch.rs:+6:9: +6:14
45 _4 = val() -> bb5; // scope 1 at $DIR/branch.rs:+6:9: +6:14
47 // + span: $DIR/branch.rs:18:9: 18:12
48 // + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
52 StorageDead(_4); // scope 1 at $DIR/branch.rs:+6:14: +6:15
53 _2 = _1; // scope 1 at $DIR/branch.rs:+7:9: +7:10
54 goto -> bb6; // scope 1 at $DIR/branch.rs:+3:13: +8:6
58 StorageDead(_3); // scope 1 at $DIR/branch.rs:+8:5: +8:6
59 _0 = _2; // scope 2 at $DIR/branch.rs:+10:5: +10:6
60 StorageDead(_2); // scope 1 at $DIR/branch.rs:+11:1: +11:2
61 StorageDead(_1); // scope 0 at $DIR/branch.rs:+11:1: +11:2
62 return; // scope 0 at $DIR/branch.rs:+11:2: +11:2