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:9:16: 9:17
6 let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/separate_const_switch.rs:9:42: 9:53
7 let mut _2: std::ops::ControlFlow<usize, i32>; // in scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
8 let mut _3: isize; // in scope 0 at $DIR/separate_const_switch.rs:16:13: 16:18
9 let _4: i32; // in scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
10 let mut _5: i32; // in scope 0 at $DIR/separate_const_switch.rs:16:44: 16:45
11 let _6: usize; // in scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
12 let mut _7: usize; // in scope 0 at $DIR/separate_const_switch.rs:17:42: 17:43
13 let mut _8: isize; // in scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
14 let _9: i32; // in scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
15 let mut _10: i32; // in scope 0 at $DIR/separate_const_switch.rs:20:42: 20:43
16 let _11: usize; // in scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
18 debug v => _4; // in scope 1 at $DIR/separate_const_switch.rs:16:16: 16:17
21 debug r => _6; // in scope 2 at $DIR/separate_const_switch.rs:17:17: 17:18
24 debug v => _9; // in scope 3 at $DIR/separate_const_switch.rs:20:31: 20:32
27 debug r => _11; // in scope 4 at $DIR/separate_const_switch.rs:21:28: 21:29
31 StorageLive(_2); // scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
32 _3 = discriminant(_1); // scope 0 at $DIR/separate_const_switch.rs:16:13: 16:18
33 switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/separate_const_switch.rs:16:13: 16:18
37 StorageLive(_6); // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
38 _6 = ((_1 as Err).0: usize); // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
39 StorageLive(_7); // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
40 _7 = _6; // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
41 ((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
42 discriminant(_2) = 1; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
43 StorageDead(_7); // scope 2 at $DIR/separate_const_switch.rs:17:43: 17:44
44 StorageDead(_6); // scope 0 at $DIR/separate_const_switch.rs:17:43: 17:44
45 - goto -> bb3; // scope 0 at $DIR/separate_const_switch.rs:15:9: 18:10
46 + _8 = discriminant(_2); // scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
47 + switchInt(move _8) -> [0_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
51 StorageLive(_4); // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
52 _4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
53 StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
54 _5 = _4; // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
55 ((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
56 discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
57 StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:16:45: 16:46
58 StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:16:45: 16:46
59 - goto -> bb3; // scope 0 at $DIR/separate_const_switch.rs:15:9: 18:10
63 _8 = discriminant(_2); // scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
64 - switchInt(move _8) -> [0_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
65 + switchInt(move _8) -> [0_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
70 StorageLive(_11); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
71 _11 = ((_2 as Break).0: usize); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
72 discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
73 StorageDead(_11); // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
74 - goto -> bb6; // scope 0 at $DIR/separate_const_switch.rs:14:5: 22:6
75 + goto -> bb5; // scope 0 at $DIR/separate_const_switch.rs:14:5: 22:6
80 StorageLive(_9); // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
81 _9 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
82 StorageLive(_10); // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
83 _10 = _9; // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
84 ((_0 as Some).0: i32) = move _10; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
85 discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
86 StorageDead(_10); // scope 3 at $DIR/separate_const_switch.rs:20:43: 20:44
87 StorageDead(_9); // scope 0 at $DIR/separate_const_switch.rs:20:43: 20:44
88 - goto -> bb6; // scope 0 at $DIR/separate_const_switch.rs:14:5: 22:6
89 + goto -> bb5; // scope 0 at $DIR/separate_const_switch.rs:14:5: 22:6
94 StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:23:1: 23:2
95 return; // scope 0 at $DIR/separate_const_switch.rs:23:2: 23:2