]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
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 | |
94222f64 XL |
8 | | '_#0r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#0r, '_#1r} |
9 | | '_#1r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '_#1r} | |
f9f354fc | 10 | | '_#2r | U0 | {} |
5869c6ff XL |
11 | | '_#3r | U0 | {bb1[0..=7], bb2[0..=2]} |
12 | | '_#4r | U0 | {bb1[1..=7], bb2[0..=2]} | |
13 | | '_#5r | U0 | {bb1[4..=7], bb2[0..=2]} | |
ba9703b0 XL |
14 | | |
15 | | Inference Constraints | |
94222f64 XL |
16 | | '_#0r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]} |
17 | | '_#1r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0]} | |
29967ef6 XL |
18 | | '_#3r live at {bb1[0]} |
19 | | '_#4r live at {bb1[1..=3]} | |
5869c6ff | 20 | | '_#5r live at {bb1[4..=7], bb2[0..=2]} |
29967ef6 XL |
21 | | '_#3r: '_#4r due to Assignment at Single(bb1[0]) |
22 | | '_#4r: '_#5r due to Assignment at Single(bb1[3]) | |
ba9703b0 XL |
23 | | |
24 | fn main() -> () { | |
f9f354fc XL |
25 | let mut _0: (); // return place in scope 0 at $DIR/region-subtyping-basic.rs:16:11: 16:11 |
26 | let mut _1: [usize; Const { ty: usize, val: Value(Scalar(0x00000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 | |
27 | let _3: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:18:16: 18:17 | |
28 | let mut _4: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18 | |
29 | let mut _5: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:18:14: 18:18 | |
30 | let mut _7: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:20:8: 20:12 | |
31 | let _8: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:21:9: 21:18 | |
32 | let mut _9: usize; // in scope 0 at $DIR/region-subtyping-basic.rs:21:15: 21:17 | |
33 | let _10: bool; // in scope 0 at $DIR/region-subtyping-basic.rs:23:9: 23:18 | |
ba9703b0 | 34 | scope 1 { |
f9f354fc XL |
35 | debug v => _1; // in scope 1 at $DIR/region-subtyping-basic.rs:17:9: 17:14 |
36 | let _2: &'_#4r usize; // in scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10 | |
ba9703b0 | 37 | scope 2 { |
f9f354fc XL |
38 | debug p => _2; // in scope 2 at $DIR/region-subtyping-basic.rs:18:9: 18:10 |
39 | let _6: &'_#5r usize; // in scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10 | |
ba9703b0 | 40 | scope 3 { |
f9f354fc | 41 | debug q => _6; // in scope 3 at $DIR/region-subtyping-basic.rs:19:9: 19:10 |
ba9703b0 XL |
42 | } |
43 | } | |
44 | } | |
45 | ||
46 | bb0: { | |
f9f354fc | 47 | StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 |
ee023bcb | 48 | _1 = [const ConstValue(Scalar(0x00000001): usize), const ConstValue(Scalar(0x00000002): usize), const ConstValue(Scalar(0x00000003): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26 |
cdc7bbd5 | 49 | FakeRead(ForLet(None), _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14 |
f9f354fc XL |
50 | StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10 |
51 | StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 | |
ee023bcb | 52 | _3 = const ConstValue(Scalar(0x00000000): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17 |
f9f354fc XL |
53 | _4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 |
54 | _5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 | |
5869c6ff | 55 | assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18 |
ba9703b0 XL |
56 | } |
57 | ||
29967ef6 XL |
58 | bb1: { |
59 | _2 = &'_#3r _1[_3]; // bb1[0]: scope 1 at $DIR/region-subtyping-basic.rs:18:13: 18:18 | |
cdc7bbd5 | 60 | FakeRead(ForLet(None), _2); // bb1[1]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10 |
29967ef6 XL |
61 | StorageLive(_6); // bb1[2]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10 |
62 | _6 = _2; // bb1[3]: scope 2 at $DIR/region-subtyping-basic.rs:19:13: 19:14 | |
cdc7bbd5 | 63 | FakeRead(ForLet(None), _6); // bb1[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10 |
29967ef6 | 64 | StorageLive(_7); // bb1[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 |
ee023bcb | 65 | _7 = const ConstValue(Scalar(0x01): bool); // bb1[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 |
94222f64 | 66 | switchInt(move _7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12 |
ba9703b0 XL |
67 | } |
68 | ||
69 | bb2: { | |
5869c6ff XL |
70 | StorageLive(_8); // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 |
71 | StorageLive(_9); // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 | |
72 | _9 = (*_6); // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17 | |
ee023bcb | 73 | _8 = ConstValue(Scalar(<ZST>): fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18 |
5869c6ff XL |
74 | // mir::Constant |
75 | // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14 | |
76 | // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) } | |
ba9703b0 XL |
77 | } |
78 | ||
79 | bb3: { | |
94222f64 XL |
80 | StorageDead(_9); // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18 |
81 | StorageDead(_8); // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19 | |
ee023bcb | 82 | _0 = const ConstValue(Scalar(<ZST>): ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6 |
94222f64 | 83 | goto -> bb6; // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 |
ba9703b0 XL |
84 | } |
85 | ||
29967ef6 | 86 | bb4: { |
94222f64 | 87 | StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 |
ee023bcb | 88 | _10 = ConstValue(Scalar(<ZST>): fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18 |
94222f64 XL |
89 | // mir::Constant |
90 | // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14 | |
91 | // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) } | |
ba9703b0 XL |
92 | } |
93 | ||
29967ef6 | 94 | bb5: { |
5869c6ff | 95 | StorageDead(_10); // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:18: 23:19 |
ee023bcb | 96 | _0 = const ConstValue(Scalar(<ZST>): ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:22:12: 24:6 |
5869c6ff | 97 | goto -> bb6; // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6 |
29967ef6 XL |
98 | } |
99 | ||
ba9703b0 | 100 | bb6: { |
5869c6ff XL |
101 | StorageDead(_7); // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:24:5: 24:6 |
102 | StorageDead(_6); // bb6[1]: scope 2 at $DIR/region-subtyping-basic.rs:25:1: 25:2 | |
103 | StorageDead(_3); // bb6[2]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2 | |
104 | StorageDead(_2); // bb6[3]: scope 1 at $DIR/region-subtyping-basic.rs:25:1: 25:2 | |
105 | StorageDead(_1); // bb6[4]: scope 0 at $DIR/region-subtyping-basic.rs:25:1: 25:2 | |
106 | return; // bb6[5]: scope 0 at $DIR/region-subtyping-basic.rs:25:2: 25:2 | |
ba9703b0 XL |
107 | } |
108 | ||
5869c6ff XL |
109 | bb7 (cleanup): { |
110 | resume; // bb7[0]: scope 0 at $DIR/region-subtyping-basic.rs:16:1: 25:2 | |
ba9703b0 XL |
111 | } |
112 | } |