summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/issue_101867.main.built.after.mir
blob: 915c5ef112c39722a5923cd28f13eab9b1f0e416 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// MIR for `main` after built

| User Type Annotations
| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
|
fn main() -> () {
    let mut _0: ();
    let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] };
    let mut _2: !;
    let _3: ();
    let mut _4: !;
    let mut _6: isize;
    scope 1 {
        debug x => _1;
        let _5: u8;
        scope 2 {
            debug y => _5;
        }
    }

    bb0: {
        StorageLive(_1);
        _1 = Option::<u8>::Some(const 1_u8);
        FakeRead(ForLet(None), _1);
        AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
        StorageLive(_5);
        FakeRead(ForMatchedPlace(None), _1);
        _6 = discriminant(_1);
        switchInt(move _6) -> [1: bb4, otherwise: bb3];
    }

    bb1: {
        StorageLive(_3);
        StorageLive(_4);
        _4 = begin_panic::<&str>(const "explicit panic") -> bb7;
    }

    bb2: {
        StorageDead(_4);
        StorageDead(_3);
        unreachable;
    }

    bb3: {
        goto -> bb6;
    }

    bb4: {
        falseEdge -> [real: bb5, imaginary: bb3];
    }

    bb5: {
        _5 = ((_1 as Some).0: u8);
        _0 = const ();
        StorageDead(_5);
        StorageDead(_1);
        return;
    }

    bb6: {
        StorageDead(_5);
        goto -> bb1;
    }

    bb7 (cleanup): {
        resume;
    }
}