1 - // MIR for `too_complex` before SeparateConstSwitch
2 + // MIR for `too_complex` after SeparateConstSwitch
4 fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
5 debug x => _1; // in scope 0 at $DIR/separate_const_switch.rs:+0:16: +0:17
6 let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/separate_const_switch.rs:+0:42: +0:53
7 let mut _2: std::ops::ControlFlow<usize, i32>; // in scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
8 let mut _3: isize; // in scope 0 at $DIR/separate_const_switch.rs:+7:13: +7:18
9 let _4: i32; // in scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
10 let mut _5: i32; // in scope 0 at $DIR/separate_const_switch.rs:+7:44: +7:45
11 let _6: usize; // in scope 0 at $DIR/separate_const_switch.rs:+8:17: +8:18
12 let mut _7: usize; // in scope 0 at $DIR/separate_const_switch.rs:+8:42: +8:43
13 let mut _8: isize; // in scope 0 at $DIR/separate_const_switch.rs:+11:9: +11:33
14 let _9: i32; // in scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
15 let mut _10: i32; // in scope 0 at $DIR/separate_const_switch.rs:+11:42: +11:43
16 let _11: usize; // in scope 0 at $DIR/separate_const_switch.rs:+12:28: +12:29
18 debug v => _4; // in scope 1 at $DIR/separate_const_switch.rs:+7:16: +7:17
21 debug r => _6; // in scope 2 at $DIR/separate_const_switch.rs:+8:17: +8:18
24 debug v => _9; // in scope 3 at $DIR/separate_const_switch.rs:+11:31: +11:32
27 debug r => _11; // in scope 4 at $DIR/separate_const_switch.rs:+12:28: +12:29
31 StorageLive(_2); // scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
32 _3 = discriminant(_1); // scope 0 at $DIR/separate_const_switch.rs:+6:15: +6:16
33 switchInt(move _3) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:+6:9: +6:16
37 StorageLive(_6); // scope 0 at $DIR/separate_const_switch.rs:+8:17: +8:18
38 _6 = ((_1 as Err).0: usize); // scope 0 at $DIR/separate_const_switch.rs:+8:17: +8:18
39 StorageLive(_7); // scope 2 at $DIR/separate_const_switch.rs:+8:42: +8:43
40 _7 = _6; // scope 2 at $DIR/separate_const_switch.rs:+8:42: +8:43
41 Deinit(_2); // scope 2 at $DIR/separate_const_switch.rs:+8:23: +8:44
42 ((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:+8:23: +8:44
43 discriminant(_2) = 1; // scope 2 at $DIR/separate_const_switch.rs:+8:23: +8:44
44 StorageDead(_7); // scope 2 at $DIR/separate_const_switch.rs:+8:43: +8:44
45 StorageDead(_6); // scope 0 at $DIR/separate_const_switch.rs:+8:43: +8:44
46 - goto -> bb4; // scope 0 at $DIR/separate_const_switch.rs:+8:43: +8:44
47 + _8 = discriminant(_2); // scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
48 + switchInt(move _8) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 0 at $DIR/separate_const_switch.rs:+5:5: +10:6
52 unreachable; // scope 0 at $DIR/separate_const_switch.rs:+6:15: +6:16
56 StorageLive(_4); // scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
57 _4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
58 StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:+7:44: +7:45
59 _5 = _4; // scope 1 at $DIR/separate_const_switch.rs:+7:44: +7:45
60 Deinit(_2); // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
61 ((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
62 discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
63 StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:+7:45: +7:46
64 StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:+7:45: +7:46
65 - goto -> bb4; // scope 0 at $DIR/separate_const_switch.rs:+7:45: +7:46
69 _8 = discriminant(_2); // scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
70 - switchInt(move _8) -> [0_isize: bb7, 1_isize: bb5, otherwise: bb6]; // scope 0 at $DIR/separate_const_switch.rs:+5:5: +10:6
71 + switchInt(move _8) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 0 at $DIR/separate_const_switch.rs:+5:5: +10:6
76 StorageLive(_11); // scope 0 at $DIR/separate_const_switch.rs:+12:28: +12:29
77 _11 = ((_2 as Break).0: usize); // scope 0 at $DIR/separate_const_switch.rs:+12:28: +12:29
78 Deinit(_0); // scope 4 at $DIR/separate_const_switch.rs:+12:34: +12:38
79 discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:+12:34: +12:38
80 StorageDead(_11); // scope 0 at $DIR/separate_const_switch.rs:+12:37: +12:38
81 - goto -> bb8; // scope 0 at $DIR/separate_const_switch.rs:+12:37: +12:38
82 + goto -> bb7; // scope 0 at $DIR/separate_const_switch.rs:+12:37: +12:38
87 unreachable; // scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
92 StorageLive(_9); // scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
93 _9 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
94 StorageLive(_10); // scope 3 at $DIR/separate_const_switch.rs:+11:42: +11:43
95 _10 = _9; // scope 3 at $DIR/separate_const_switch.rs:+11:42: +11:43
96 Deinit(_0); // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
97 ((_0 as Some).0: i32) = move _10; // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
98 discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
99 StorageDead(_10); // scope 3 at $DIR/separate_const_switch.rs:+11:43: +11:44
100 StorageDead(_9); // scope 0 at $DIR/separate_const_switch.rs:+11:43: +11:44
101 - goto -> bb8; // scope 0 at $DIR/separate_const_switch.rs:+11:43: +11:44
102 + goto -> bb7; // scope 0 at $DIR/separate_const_switch.rs:+11:43: +11:44
107 StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:+14:1: +14:2
108 return; // scope 0 at $DIR/separate_const_switch.rs:+14:2: +14:2