1 - // MIR for `id_result` before SimplifyArmIdentity
2 + // MIR for `id_result` after SimplifyArmIdentity
4 fn id_result(_1: std::result::Result<u8, i32>) -> std::result::Result<u8, i32> {
5 debug r => _1; // in scope 0 at $DIR/simplify-arm.rs:16:14: 16:15
6 let mut _0: std::result::Result<u8, i32>; // return place in scope 0 at $DIR/simplify-arm.rs:16:37: 16:52
7 let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
8 let _3: u8; // in scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
9 let mut _4: u8; // in scope 0 at $DIR/simplify-arm.rs:18:21: 18:22
10 let _5: i32; // in scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
11 let mut _6: i32; // in scope 0 at $DIR/simplify-arm.rs:19:23: 19:24
13 - debug x => _3; // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
14 + debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
17 - debug y => _5; // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
18 + debug y => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
22 _2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
23 switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:18:9: 18:14
27 - StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
28 - _5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
29 - StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
30 - _6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
31 - ((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
32 - discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
33 - StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
34 - StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
35 + _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
36 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
40 unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
44 - StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
45 - _3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
46 - StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
47 - _4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
48 - ((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
49 - discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
50 - StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
51 - StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
52 + _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
53 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6
57 return; // scope 0 at $DIR/simplify-arm.rs:21:2: 21:2