| - // MIR for `id_result` before SimplifyBranchSame |
| + // MIR for `id_result` after SimplifyBranchSame |
| |
| fn id_result(_1: Result<u8, i32>) -> Result<u8, i32> { |
| debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15 |
| let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:16:37: 16:52 |
| let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:18:9: 18:14 |
| let _3: u8; // in scope 0 at $DIR/simplify-arm.rs:18:12: 18:13 |
| let mut _4: u8; // in scope 0 at $DIR/simplify-arm.rs:18:21: 18:22 |
| let _5: i32; // in scope 0 at $DIR/simplify-arm.rs:19:13: 19:14 |
| let mut _6: i32; // in scope 0 at $DIR/simplify-arm.rs:19:23: 19:24 |
| scope 1 { |
| debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13 |
| } |
| scope 2 { |
| debug y => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14 |
| } |
| |
| bb0: { |
| _2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14 |
| - switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14 |
| + goto -> bb1; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14 |
| } |
| |
| bb1: { |
| - _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25 |
| - goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 |
| - } |
| - |
| - bb2: { |
| - unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12 |
| - } |
| - |
| - bb3: { |
| _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23 |
| - goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 |
| + goto -> bb2; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 |
| } |
| |
| - bb4: { |
| + bb2: { |
| return; // scope 0 at $DIR/simplify-arm.rs:21:2: 21:2 |
| } |
| } |
| |