1 // MIR for `old` after PreCodegen
3 fn old(_1: Result<T, E>) -> Result<T, E> {
4 debug x => _1; // in scope 0 at $DIR/try_identity_e2e.rs:+0:14: +0:15
5 let mut _0: std::result::Result<T, E>; // return place in scope 0 at $DIR/try_identity_e2e.rs:+0:34: +0:46
6 let mut _2: T; // in scope 0 at $DIR/try_identity_e2e.rs:+2:9: +5:10
7 let mut _3: isize; // in scope 0 at $DIR/try_identity_e2e.rs:+3:13: +3:18
8 let _4: T; // in scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
9 let _5: E; // in scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
10 let mut _6: E; // in scope 0 at $DIR/try_identity_e2e.rs:+4:34: +4:35
12 debug v => _4; // in scope 1 at $DIR/try_identity_e2e.rs:+3:16: +3:17
15 debug e => _5; // in scope 2 at $DIR/try_identity_e2e.rs:+4:17: +4:18
19 StorageLive(_2); // scope 0 at $DIR/try_identity_e2e.rs:+2:9: +5:10
20 _3 = discriminant(_1); // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
21 switchInt(move _3) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/try_identity_e2e.rs:+2:9: +2:16
25 StorageLive(_5); // scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
26 _5 = move ((_1 as Err).0: E); // scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
27 StorageLive(_6); // scope 2 at $DIR/try_identity_e2e.rs:+4:34: +4:35
28 _6 = move _5; // scope 2 at $DIR/try_identity_e2e.rs:+4:34: +4:35
29 Deinit(_0); // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
30 ((_0 as Err).0: E) = move _6; // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
31 discriminant(_0) = 1; // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
32 StorageDead(_6); // scope 2 at $DIR/try_identity_e2e.rs:+4:35: +4:36
33 StorageDead(_5); // scope 0 at $DIR/try_identity_e2e.rs:+4:35: +4:36
34 StorageDead(_2); // scope 0 at $DIR/try_identity_e2e.rs:+6:5: +6:6
35 return; // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2
39 unreachable; // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
43 StorageLive(_4); // scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
44 _4 = move ((_1 as Ok).0: T); // scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
45 _2 = move _4; // scope 1 at $DIR/try_identity_e2e.rs:+3:22: +3:23
46 StorageDead(_4); // scope 0 at $DIR/try_identity_e2e.rs:+3:22: +3:23
47 Deinit(_0); // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
48 ((_0 as Ok).0: T) = move _2; // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
49 discriminant(_0) = 0; // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
50 StorageDead(_2); // scope 0 at $DIR/try_identity_e2e.rs:+6:5: +6:6
51 return; // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2