63 lines
3.7 KiB
Rust
63 lines
3.7 KiB
Rust
// MIR for `main` after built
|
|
|
|
fn main() -> () {
|
|
let mut _0: (); // return place in scope 0 at $DIR/issue_72181.rs:+0:11: +0:11
|
|
let mut _1: usize; // in scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
|
|
let mut _3: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:14: +3:27
|
|
let mut _4: Foo; // in scope 0 at $DIR/issue_72181.rs:+3:29: +3:42
|
|
let mut _5: u64; // in scope 0 at $DIR/issue_72181.rs:+4:13: +4:30
|
|
let _6: usize; // in scope 0 at $DIR/issue_72181.rs:+4:24: +4:25
|
|
let mut _7: usize; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
|
|
let mut _8: bool; // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
|
|
scope 1 {
|
|
let _2: [Foo; 2]; // in scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
|
|
scope 2 {
|
|
debug f => _2; // in scope 2 at $DIR/issue_72181.rs:+3:9: +3:10
|
|
scope 3 {
|
|
}
|
|
scope 4 {
|
|
}
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1); // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
|
|
_1 = std::mem::size_of::<Foo>() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
|
|
// mir::Constant
|
|
// + span: $DIR/issue_72181.rs:24:13: 24:32
|
|
// + literal: Const { ty: fn() -> usize {std::mem::size_of::<Foo>}, val: Value(<ZST>) }
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_1); // scope 0 at $DIR/issue_72181.rs:+1:34: +1:35
|
|
StorageLive(_2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
|
|
StorageLive(_3); // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
|
|
_3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
|
|
StorageLive(_4); // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
|
|
_4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
|
|
_2 = [move _3, move _4]; // scope 1 at $DIR/issue_72181.rs:+3:13: +3:43
|
|
StorageDead(_4); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
|
|
StorageDead(_3); // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
|
|
FakeRead(ForLet(None), _2); // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
|
|
StorageLive(_5); // scope 2 at $DIR/issue_72181.rs:+4:13: +4:30
|
|
StorageLive(_6); // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
|
|
_6 = const 0_usize; // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
|
|
_7 = Len(_2); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
|
|
_8 = Lt(_6, _7); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
|
|
assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
|
|
}
|
|
|
|
bb2: {
|
|
_5 = (_2[_6].0: u64); // scope 4 at $DIR/issue_72181.rs:+4:22: +4:28
|
|
StorageDead(_6); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
|
|
StorageDead(_5); // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
|
|
_0 = const (); // scope 0 at $DIR/issue_72181.rs:+0:11: +5:2
|
|
StorageDead(_2); // scope 1 at $DIR/issue_72181.rs:+5:1: +5:2
|
|
return; // scope 0 at $DIR/issue_72181.rs:+5:2: +5:2
|
|
}
|
|
|
|
bb3 (cleanup): {
|
|
resume; // scope 0 at $DIR/issue_72181.rs:+0:1: +5:2
|
|
}
|
|
}
|