rust/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
Rémy Rakic dff3d3588d add borrows to NLL MIR dumps
explicitly disable `-Zmir-include-spans` in mir-opt tests

This will override the NLL default of true, and keep the blessed dumps
easier to work with.
2024-08-30 07:14:31 +00:00

109 lines
3.1 KiB
Rust

// MIR for `main` 0 nll
| Free Region Mapping
| '?0 | Global | ['?0, '?1]
| '?1 | Local | ['?1]
|
| Inferred Region Values
| '?0 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?0, '?1}
| '?1 | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=3], bb4[0..=1], bb5[0..=2], bb6[0..=5], bb7[0], '?1}
| '?2 | U0 | {bb1[0..=7], bb2[0..=2]}
| '?3 | U0 | {bb1[1..=7], bb2[0..=2]}
| '?4 | U0 | {bb1[4..=7], bb2[0..=2]}
|
| Inference Constraints
| '?0 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]}
| '?1 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]}
| '?2 live at {bb1[0]}
| '?3 live at {bb1[1..=3]}
| '?4 live at {bb1[4..=7], bb2[0..=2]}
| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:19:13: 19:18 (#0)
| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:20:13: 20:14 (#0)
|
| Borrows
| bw0: issued at bb1[0] in '?2
|
fn main() -> () {
let mut _0: ();
let mut _1: [usize; ValTree(Leaf(0x00000003): usize)];
let _3: usize;
let mut _4: usize;
let mut _5: bool;
let mut _7: bool;
let _8: bool;
let mut _9: usize;
let _10: bool;
scope 1 {
debug v => _1;
let _2: &'?3 usize;
scope 2 {
debug p => _2;
let _6: &'?4 usize;
scope 3 {
debug q => _6;
}
}
}
bb0: {
StorageLive(_1);
_1 = [const ConstValue(Scalar(0x00000001): usize), const ConstValue(Scalar(0x00000002): usize), const ConstValue(Scalar(0x00000003): usize)];
FakeRead(ForLet(None), _1);
StorageLive(_2);
StorageLive(_3);
_3 = const ConstValue(Scalar(0x00000000): usize);
_4 = Len(_1);
_5 = Lt(copy _3, copy _4);
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, copy _3) -> [success: bb1, unwind: bb7];
}
bb1: {
_2 = &'?2 _1[_3];
FakeRead(ForLet(None), _2);
StorageLive(_6);
_6 = copy _2;
FakeRead(ForLet(None), _6);
StorageLive(_7);
_7 = const ConstValue(Scalar(0x01): bool);
switchInt(move _7) -> [0: bb4, otherwise: bb2];
}
bb2: {
StorageLive(_8);
StorageLive(_9);
_9 = copy (*_6);
_8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7];
}
bb3: {
StorageDead(_9);
StorageDead(_8);
_0 = const ConstValue(ZeroSized: ());
goto -> bb6;
}
bb4: {
StorageLive(_10);
_10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7];
}
bb5: {
StorageDead(_10);
_0 = const ConstValue(ZeroSized: ());
goto -> bb6;
}
bb6: {
StorageDead(_7);
StorageDead(_6);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
}
bb7 (cleanup): {
resume;
}
}