]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/try_identity_e2e.old.PreCodegen.after.mir
Test drop_tracking_mir before querying generator.
[rust.git] / tests / mir-opt / try_identity_e2e.old.PreCodegen.after.mir
1 // MIR for `old` after PreCodegen
2
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: isize;                   // in scope 0 at $DIR/try_identity_e2e.rs:+3:13: +3:18
7     let _3: T;                           // in scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
8     let mut _4: E;                       // in scope 0 at $DIR/try_identity_e2e.rs:+4:34: +4:35
9     scope 1 {
10         debug v => _3;                   // in scope 1 at $DIR/try_identity_e2e.rs:+3:16: +3:17
11     }
12     scope 2 {
13         debug e => _4;                   // in scope 2 at $DIR/try_identity_e2e.rs:+4:17: +4:18
14     }
15
16     bb0: {
17         _2 = discriminant(_1);           // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
18         switchInt(move _2) -> [0: bb3, 1: bb1, otherwise: bb2]; // scope 0 at $DIR/try_identity_e2e.rs:+2:9: +2:16
19     }
20
21     bb1: {
22         _4 = move ((_1 as Err).0: E);    // scope 0 at $DIR/try_identity_e2e.rs:+4:17: +4:18
23         Deinit(_0);                      // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
24         ((_0 as Err).0: E) = move _4;    // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
25         discriminant(_0) = 1;            // scope 2 at $DIR/try_identity_e2e.rs:+4:30: +4:36
26         return;                          // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2
27     }
28
29     bb2: {
30         unreachable;                     // scope 0 at $DIR/try_identity_e2e.rs:+2:15: +2:16
31     }
32
33     bb3: {
34         _3 = move ((_1 as Ok).0: T);     // scope 0 at $DIR/try_identity_e2e.rs:+3:16: +3:17
35         Deinit(_0);                      // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
36         ((_0 as Ok).0: T) = move _3;     // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
37         discriminant(_0) = 0;            // scope 0 at $DIR/try_identity_e2e.rs:+1:5: +6:6
38         return;                          // scope 0 at $DIR/try_identity_e2e.rs:+7:1: +7:2
39     }
40 }