]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/storage_ranges/rustc.main.nll.0.mir
7799f20d974bcfbb2bf8235b941c8f8c47357262
[rust.git] / src / test / mir-opt / storage_ranges / rustc.main.nll.0.mir
1 // MIR for `main` 0 nll
2
3 | Free Region Mapping
4 | '_#0r | Global | ['_#0r, '_#1r]
5 | '_#1r | Local | ['_#1r]
6 |
7 | Inferred Region Values
8 | '_#0r | U0 | {bb0[0..=22], '_#0r, '_#1r}
9 | '_#1r | U0 | {bb0[0..=22], '_#1r}
10 | '_#2r | U0 | {}
11 | '_#3r | U0 | {bb0[10..=11]}
12 | '_#4r | U0 | {bb0[11]}
13 |
14 | Inference Constraints
15 | '_#0r live at {bb0[0..=22]}
16 | '_#1r live at {bb0[0..=22]}
17 | '_#3r live at {bb0[10]}
18 | '_#4r live at {bb0[11]}
19 | '_#3r: '_#4r due to Assignment at Single(bb0[10])
20 |
21 fn main() -> () {
22     let mut _0: ();                      // return place in scope 0 at $DIR/storage_ranges.rs:3:11: 3:11
23     let _1: i32;                         // in scope 0 at $DIR/storage_ranges.rs:4:9: 4:10
24     let _2: ();                          // in scope 0 at $DIR/storage_ranges.rs:5:5: 7:6
25     let _4: std::option::Option<i32>;    // in scope 0 at $DIR/storage_ranges.rs:6:18: 6:25
26     let mut _5: i32;                     // in scope 0 at $DIR/storage_ranges.rs:6:23: 6:24
27     scope 1 {
28         debug a => _1;                   // in scope 1 at $DIR/storage_ranges.rs:4:9: 4:10
29         let _3: &std::option::Option<i32>; // in scope 1 at $DIR/storage_ranges.rs:6:13: 6:14
30         let _6: i32;                     // in scope 1 at $DIR/storage_ranges.rs:8:9: 8:10
31         scope 2 {
32             debug b => _3;               // in scope 2 at $DIR/storage_ranges.rs:6:13: 6:14
33         }
34         scope 3 {
35             debug c => _6;               // in scope 3 at $DIR/storage_ranges.rs:8:9: 8:10
36         }
37     }
38
39     bb0: {
40         StorageLive(_1);                 // scope 0 at $DIR/storage_ranges.rs:4:9: 4:10
41         _1 = const 0i32;                 // scope 0 at $DIR/storage_ranges.rs:4:13: 4:14
42                                          // ty::Const
43                                          // + ty: i32
44                                          // + val: Value(Scalar(0x00000000))
45                                          // mir::Constant
46                                          // + span: $DIR/storage_ranges.rs:4:13: 4:14
47                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
48         FakeRead(ForLet, _1);            // scope 0 at $DIR/storage_ranges.rs:4:9: 4:10
49         StorageLive(_2);                 // scope 1 at $DIR/storage_ranges.rs:5:5: 7:6
50         StorageLive(_3);                 // scope 1 at $DIR/storage_ranges.rs:6:13: 6:14
51         StorageLive(_4);                 // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25
52         StorageLive(_5);                 // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24
53         _5 = _1;                         // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24
54         _4 = std::option::Option::<i32>::Some(move _5); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25
55         StorageDead(_5);                 // scope 1 at $DIR/storage_ranges.rs:6:24: 6:25
56         _3 = &_4;                        // scope 1 at $DIR/storage_ranges.rs:6:17: 6:25
57         FakeRead(ForLet, _3);            // scope 1 at $DIR/storage_ranges.rs:6:13: 6:14
58         _2 = const ();                   // scope 1 at $DIR/storage_ranges.rs:5:5: 7:6
59                                          // ty::Const
60                                          // + ty: ()
61                                          // + val: Value(Scalar(<ZST>))
62                                          // mir::Constant
63                                          // + span: $DIR/storage_ranges.rs:5:5: 7:6
64                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
65         StorageDead(_4);                 // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6
66         StorageDead(_3);                 // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6
67         StorageDead(_2);                 // scope 1 at $DIR/storage_ranges.rs:7:5: 7:6
68         StorageLive(_6);                 // scope 1 at $DIR/storage_ranges.rs:8:9: 8:10
69         _6 = const 1i32;                 // scope 1 at $DIR/storage_ranges.rs:8:13: 8:14
70                                          // ty::Const
71                                          // + ty: i32
72                                          // + val: Value(Scalar(0x00000001))
73                                          // mir::Constant
74                                          // + span: $DIR/storage_ranges.rs:8:13: 8:14
75                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
76         FakeRead(ForLet, _6);            // scope 1 at $DIR/storage_ranges.rs:8:9: 8:10
77         _0 = const ();                   // scope 0 at $DIR/storage_ranges.rs:3:11: 9:2
78                                          // ty::Const
79                                          // + ty: ()
80                                          // + val: Value(Scalar(<ZST>))
81                                          // mir::Constant
82                                          // + span: $DIR/storage_ranges.rs:3:11: 9:2
83                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
84         StorageDead(_6);                 // scope 1 at $DIR/storage_ranges.rs:9:1: 9:2
85         StorageDead(_1);                 // scope 0 at $DIR/storage_ranges.rs:9:1: 9:2
86         return;                          // scope 0 at $DIR/storage_ranges.rs:9:2: 9:2
87     }
88 }