1 // MIR for `too_complex` after PreCodegen
3 fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
4 debug x => _1; // in scope 0 at $DIR/separate_const_switch.rs:+0:16: +0:17
5 let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/separate_const_switch.rs:+0:42: +0:53
6 let mut _2: std::ops::ControlFlow<usize, i32>; // in scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
7 let mut _3: isize; // in scope 0 at $DIR/separate_const_switch.rs:+7:13: +7:18
8 let _4: i32; // in scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
9 let mut _5: i32; // in scope 0 at $DIR/separate_const_switch.rs:+7:44: +7:45
10 let _6: usize; // in scope 0 at $DIR/separate_const_switch.rs:+8:17: +8:18
11 let _7: i32; // in scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
12 let mut _8: i32; // in scope 0 at $DIR/separate_const_switch.rs:+11:42: +11:43
13 let _9: usize; // in scope 0 at $DIR/separate_const_switch.rs:+12:28: +12:29
15 debug v => _4; // in scope 1 at $DIR/separate_const_switch.rs:+7:16: +7:17
18 debug r => _6; // in scope 2 at $DIR/separate_const_switch.rs:+8:17: +8:18
21 debug v => _7; // in scope 3 at $DIR/separate_const_switch.rs:+11:31: +11:32
24 debug r => _9; // in scope 4 at $DIR/separate_const_switch.rs:+12:28: +12:29
28 StorageLive(_2); // scope 0 at $DIR/separate_const_switch.rs:+5:11: +10:6
29 _3 = discriminant(_1); // scope 0 at $DIR/separate_const_switch.rs:+6:15: +6:16
30 switchInt(move _3) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:+6:9: +6:16
34 StorageLive(_6); // scope 0 at $DIR/separate_const_switch.rs:+8:17: +8:18
35 StorageDead(_6); // scope 0 at $DIR/separate_const_switch.rs:+8:43: +8:44
36 StorageLive(_9); // scope 0 at $DIR/separate_const_switch.rs:+12:28: +12:29
37 Deinit(_0); // scope 4 at $DIR/separate_const_switch.rs:+12:34: +12:38
38 discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:+12:34: +12:38
39 StorageDead(_9); // scope 0 at $DIR/separate_const_switch.rs:+12:37: +12:38
40 goto -> bb4; // scope 0 at $DIR/separate_const_switch.rs:+12:37: +12:38
44 unreachable; // scope 0 at $DIR/separate_const_switch.rs:+6:15: +6:16
48 StorageLive(_4); // scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
49 _4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:+7:16: +7:17
50 StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:+7:44: +7:45
51 _5 = _4; // scope 1 at $DIR/separate_const_switch.rs:+7:44: +7:45
52 Deinit(_2); // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
53 ((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
54 discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:+7:22: +7:46
55 StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:+7:45: +7:46
56 StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:+7:45: +7:46
57 StorageLive(_7); // scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
58 _7 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:+11:31: +11:32
59 StorageLive(_8); // scope 3 at $DIR/separate_const_switch.rs:+11:42: +11:43
60 _8 = _7; // scope 3 at $DIR/separate_const_switch.rs:+11:42: +11:43
61 Deinit(_0); // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
62 ((_0 as Some).0: i32) = move _8; // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
63 discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:+11:37: +11:44
64 StorageDead(_8); // scope 3 at $DIR/separate_const_switch.rs:+11:43: +11:44
65 StorageDead(_7); // scope 0 at $DIR/separate_const_switch.rs:+11:43: +11:44
66 goto -> bb4; // scope 0 at $DIR/separate_const_switch.rs:+11:43: +11:44
70 StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:+14:1: +14:2
71 return; // scope 0 at $DIR/separate_const_switch.rs:+14:2: +14:2