rust/tests/mir-opt/issue_91633.foo.built.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
3.0 KiB
Rust
Raw Normal View History

// MIR for `foo` after built
2022-08-13 15:13:20 +00:00
fn foo(_1: Box<[T]>) -> T {
2022-11-02 21:54:49 +00:00
debug it => _1; // in scope 0 at $DIR/issue_91633.rs:+0:19: +0:21
let mut _0: T; // return place in scope 0 at $DIR/issue_91633.rs:+0:36: +0:37
let _2: T; // in scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
let mut _3: &T; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
let _4: usize; // in scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
let mut _5: usize; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
let mut _6: bool; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
2022-08-13 15:13:20 +00:00
scope 1 {
2022-11-02 21:54:49 +00:00
debug f => _2; // in scope 1 at $DIR/issue_91633.rs:+2:10: +2:11
2022-08-13 15:13:20 +00:00
}
bb0: {
2022-11-02 21:54:49 +00:00
StorageLive(_2); // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
StorageLive(_3); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
StorageLive(_4); // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
_4 = const 0_usize; // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
_5 = Len((*_1)); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
_6 = Lt(_4, _5); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> [success: bb1, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
2022-08-13 15:13:20 +00:00
}
bb1: {
2022-11-02 21:54:49 +00:00
_3 = &(*_1)[_4]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
_2 = <T as Clone>::clone(move _3) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
2022-08-13 15:13:20 +00:00
// mir::Constant
2022-11-02 21:54:49 +00:00
// + span: $DIR/issue_91633.rs:28:20: 28:25
2022-09-21 15:57:30 +00:00
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
2022-08-13 15:13:20 +00:00
}
bb2: {
2022-11-02 21:54:49 +00:00
StorageDead(_3); // scope 0 at $DIR/issue_91633.rs:+2:26: +2:27
FakeRead(ForLet(None), _2); // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
StorageDead(_4); // scope 0 at $DIR/issue_91633.rs:+2:27: +2:28
_0 = move _2; // scope 1 at $DIR/issue_91633.rs:+3:6: +3:7
drop(_2) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
2022-08-13 15:13:20 +00:00
}
bb3: {
2022-11-02 21:54:49 +00:00
StorageDead(_2); // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
drop(_1) -> [return: bb4, unwind: bb6]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
2022-08-13 15:13:20 +00:00
}
bb4: {
2022-11-02 21:54:49 +00:00
return; // scope 0 at $DIR/issue_91633.rs:+4:3: +4:3
2022-08-13 15:13:20 +00:00
}
bb5 (cleanup): {
2022-11-02 21:54:49 +00:00
drop(_1) -> bb6; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
2022-08-13 15:13:20 +00:00
}
bb6 (cleanup): {
2022-11-02 21:54:49 +00:00
resume; // scope 0 at $DIR/issue_91633.rs:+0:1: +4:3
2022-08-13 15:13:20 +00:00
}
}