summary refs log tree commit diff
path: root/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir
blob: b12036f6a03e422190c8d63cf4e8c9590bfa5e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// MIR for `try_identity` after SimplifyLocals

fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
    debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:5:17: 5:18
    let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:5:41: 5:57
    let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:6:9: 6:10
    let _3: i32;                         // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
    let mut _4: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
    let mut _5: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
    let _6: u32;                         // in scope 0 at $DIR/simplify_try.rs:6:13: 6:15
    scope 1 {
        debug y => _2;                   // in scope 1 at $DIR/simplify_try.rs:6:9: 6:10
    }
    scope 2 {
        debug err => _3;                 // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
        scope 3 {
            scope 7 {
                debug t => _5;           // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
            }
            scope 8 {
                debug v => _4;           // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
            }
        }
    }
    scope 4 {
        debug val => _6;                 // in scope 4 at $DIR/simplify_try.rs:6:13: 6:15
        scope 5 {
        }
    }
    scope 6 {
        debug self => _1;                // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
    }

    bb0: {
        StorageLive(_2);                 // scope 0 at $DIR/simplify_try.rs:6:9: 6:10
        _0 = move _1;                    // scope 1 at $DIR/simplify_try.rs:7:5: 7:10
        StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:8:1: 8:2
        return;                          // scope 0 at $DIR/simplify_try.rs:8:2: 8:2
    }
}