|
15 | 15 | scope 1 {
|
16 | 16 | debug residual => _6; // in scope 1 at $DIR/separate_const_switch.rs:29:9: 29:10
|
17 | 17 | scope 2 {
|
18 |
| - scope 5 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10 |
19 |
| - debug residual => _8; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
20 |
| - let _10: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
21 |
| - let mut _11: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
22 |
| - let mut _12: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
23 |
| - scope 6 { |
24 |
| - debug e => _10; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
25 |
| - scope 7 (inlined <i32 as From<i32>>::from) { // at $SRC_DIR/core/src/result.rs:LL:COL |
26 |
| - debug t => _12; // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 18 | + scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) { // at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 19 | + debug residual => _8; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 20 | + let _16: i32; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 21 | + let mut _17: i32; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 22 | + let mut _18: i32; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 23 | + scope 9 { |
| 24 | + debug e => _16; // in scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 25 | + scope 10 (inlined <i32 as From<i32>>::from) { // at $SRC_DIR/core/src/result.rs:LL:COL |
| 26 | + debug t => _18; // in scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
27 | 27 | }
|
28 | 28 | }
|
29 | 29 | }
|
|
34 | 34 | scope 4 {
|
35 | 35 | }
|
36 | 36 | }
|
| 37 | + scope 5 (inlined <Result<i32, i32> as Try>::branch) { // at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 38 | + debug self => _4; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 39 | + let mut _10: isize; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 40 | + let _11: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 41 | + let mut _12: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 42 | + let _13: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 43 | + let mut _14: std::result::Result<std::convert::Infallible, i32>; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 44 | + let mut _15: i32; // in scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 45 | + scope 6 { |
| 46 | + debug v => _11; // in scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 47 | + } |
| 48 | + scope 7 { |
| 49 | + debug e => _13; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 50 | + } |
| 51 | + } |
37 | 52 |
|
38 | 53 | bb0: {
|
39 | 54 | StorageLive(_2); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
|
40 | 55 | StorageLive(_3); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
|
41 | 56 | StorageLive(_4); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:9
|
42 | 57 | _4 = _1; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:9
|
43 |
| - _3 = <Result<i32, i32> as Try>::branch(move _4) -> bb1; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
44 |
| - // mir::Constant |
45 |
| - // + span: $DIR/separate_const_switch.rs:29:8: 29:10 |
46 |
| - // + literal: Const { ty: fn(Result<i32, i32>) -> ControlFlow<<Result<i32, i32> as Try>::Residual, <Result<i32, i32> as Try>::Output> {<Result<i32, i32> as Try>::branch}, val: Value(Scalar(<ZST>)) } |
| 58 | + StorageLive(_10); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 59 | + _10 = discriminant(_4); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 60 | + switchInt(move _10) -> [0_isize: bb5, 1_isize: bb3, otherwise: bb4]; // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
47 | 61 | }
|
48 | 62 |
|
49 | 63 | bb1: {
|
50 |
| - StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10 |
51 |
| - _5 = discriminant(_3); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
52 |
| - switchInt(move _5) -> [0_isize: bb2, otherwise: bb3]; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
53 |
| - } |
54 |
| - |
55 |
| - bb2: { |
56 | 64 | StorageLive(_9); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
|
57 | 65 | _9 = ((_3 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
|
58 | 66 | _2 = _9; // scope 4 at $DIR/separate_const_switch.rs:29:8: 29:10
|
|
65 | 73 | return; // scope 0 at $DIR/separate_const_switch.rs:30:2: 30:2
|
66 | 74 | }
|
67 | 75 |
|
68 |
| - bb3: { |
| 76 | + bb2: { |
69 | 77 | StorageLive(_6); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
|
70 | 78 | _6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
|
71 | 79 | StorageLive(_8); // scope 2 at $DIR/separate_const_switch.rs:29:9: 29:10
|
72 | 80 | _8 = _6; // scope 2 at $DIR/separate_const_switch.rs:29:9: 29:10
|
73 |
| - StorageLive(_10); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
74 |
| - _10 = move ((_8 as Err).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
75 |
| - StorageLive(_11); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
76 |
| - StorageLive(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
77 |
| - _12 = move _10; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
78 |
| - _11 = move _12; // scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
79 |
| - StorageDead(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
80 |
| - Deinit(_0); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
81 |
| - ((_0 as Err).0: i32) = move _11; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
82 |
| - discriminant(_0) = 1; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
83 |
| - StorageDead(_11); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
84 |
| - StorageDead(_10); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 81 | + StorageLive(_16); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 82 | + _16 = move ((_8 as Err).0: i32); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
| 83 | + StorageLive(_17); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 84 | + StorageLive(_18); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 85 | + _18 = move _16; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 86 | + _17 = move _18; // scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL |
| 87 | + StorageDead(_18); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 88 | + Deinit(_0); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 89 | + ((_0 as Err).0: i32) = move _17; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 90 | + discriminant(_0) = 1; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 91 | + StorageDead(_17); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL |
| 92 | + StorageDead(_16); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL |
85 | 93 | StorageDead(_8); // scope 2 at $DIR/separate_const_switch.rs:29:9: 29:10
|
86 | 94 | StorageDead(_6); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
|
87 | 95 | StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:29:10: 29:11
|
88 | 96 | StorageDead(_3); // scope 0 at $DIR/separate_const_switch.rs:30:1: 30:2
|
89 | 97 | return; // scope 0 at $DIR/separate_const_switch.rs:30:2: 30:2
|
90 | 98 | }
|
| 99 | + |
| 100 | + bb3: { |
| 101 | + StorageLive(_13); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 102 | + _13 = move ((_4 as Err).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 103 | + StorageLive(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 104 | + StorageLive(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 105 | + _15 = move _13; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 106 | + Deinit(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 107 | + ((_14 as Err).0: i32) = move _15; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 108 | + discriminant(_14) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 109 | + StorageDead(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 110 | + Deinit(_3); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 111 | + ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>) = move _14; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 112 | + discriminant(_3) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 113 | + StorageDead(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL |
| 114 | + StorageDead(_13); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 115 | + StorageDead(_10); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 116 | + StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10 |
| 117 | +- _5 = discriminant(_3); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 118 | +- switchInt(move _5) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 119 | ++ _5 = const 1_isize; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 120 | ++ switchInt(const 1_isize) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 121 | + } |
| 122 | + |
| 123 | + bb4: { |
| 124 | + unreachable; // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 125 | + } |
| 126 | + |
| 127 | + bb5: { |
| 128 | + StorageLive(_11); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 129 | + _11 = move ((_4 as Ok).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 130 | + StorageLive(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 131 | + _12 = move _11; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 132 | + Deinit(_3); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 133 | + ((_3 as Continue).0: i32) = move _12; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 134 | + discriminant(_3) = 0; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 135 | + StorageDead(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL |
| 136 | + StorageDead(_11); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL |
| 137 | + StorageDead(_10); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 138 | + StorageDead(_4); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10 |
| 139 | +- _5 = discriminant(_3); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 140 | +- switchInt(move _5) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 141 | ++ _5 = const 0_isize; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 142 | ++ switchInt(const 0_isize) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10 |
| 143 | + } |
91 | 144 | }
|
92 | 145 |
|
0 commit comments