fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.3 KiB86 linesraw
1// MIR for `main` after SimplifyCfg-initial
2
3| User Type Annotations
4| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
5| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
6|
7fn main() -> () {
8    let mut _0: ();
9    let _1: bool;
10    let mut _3: bool;
11    let mut _6: std::option::Option<std::boxed::Box<u32>>;
12    scope 1 {
13        debug nodrop_x => _1;
14        let _2: bool;
15        scope 2 {
16            debug nodrop_y => _2;
17            let _4: std::option::Option<std::boxed::Box<u32>> as UserTypeProjection { base: UserType(0), projs: [] };
18            scope 3 {
19                debug drop_x => _4;
20                let _5: std::option::Option<std::boxed::Box<u32>>;
21                scope 4 {
22                    debug drop_y => _5;
23                }
24            }
25        }
26    }
27
28    bb0: {
29        StorageLive(_1);
30        _1 = const false;
31        FakeRead(ForLet(None), _1);
32        StorageLive(_2);
33        StorageLive(_3);
34        _3 = _1;
35        _2 = move _3;
36        StorageDead(_3);
37        StorageLive(_4);
38        _4 = Option::<Box<u32>>::None;
39        FakeRead(ForLet(None), _4);
40        AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] });
41        StorageLive(_5);
42        StorageLive(_6);
43        _6 = move _4;
44        drop(_5) -> [return: bb1, unwind: bb2];
45    }
46
47    bb1: {
48        _5 = move _6;
49        drop(_6) -> [return: bb3, unwind: bb6];
50    }
51
52    bb2 (cleanup): {
53        _5 = move _6;
54        drop(_6) -> [return: bb6, unwind terminate(cleanup)];
55    }
56
57    bb3: {
58        StorageDead(_6);
59        _0 = const ();
60        drop(_5) -> [return: bb4, unwind: bb7];
61    }
62
63    bb4: {
64        StorageDead(_5);
65        drop(_4) -> [return: bb5, unwind: bb8];
66    }
67
68    bb5: {
69        StorageDead(_4);
70        StorageDead(_2);
71        StorageDead(_1);
72        return;
73    }
74
75    bb6 (cleanup): {
76        drop(_5) -> [return: bb7, unwind terminate(cleanup)];
77    }
78
79    bb7 (cleanup): {
80        drop(_4) -> [return: bb8, unwind terminate(cleanup)];
81    }
82
83    bb8 (cleanup): {
84        resume;
85    }
86}