1 // MIR for `foo` after built
3 fn foo(_1: Box<[T]>) -> T {
4 debug it => _1; // in scope 0 at $DIR/issue_91633.rs:+0:19: +0:21
5 let mut _0: T; // return place in scope 0 at $DIR/issue_91633.rs:+0:36: +0:37
6 let _2: T; // in scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
7 let mut _3: &T; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
8 let _4: usize; // in scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
9 let mut _5: usize; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
10 let mut _6: bool; // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
12 debug f => _2; // in scope 1 at $DIR/issue_91633.rs:+2:10: +2:11
16 StorageLive(_2); // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
17 StorageLive(_3); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
18 StorageLive(_4); // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
19 _4 = const 0_usize; // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
20 _5 = Len((*_1)); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
21 _6 = Lt(_4, _5); // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
22 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
26 _3 = &(*_1)[_4]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
27 _2 = <T as Clone>::clone(move _3) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
29 // + span: $DIR/issue_91633.rs:28:20: 28:25
30 // + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
34 StorageDead(_3); // scope 0 at $DIR/issue_91633.rs:+2:26: +2:27
35 FakeRead(ForLet(None), _2); // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
36 StorageDead(_4); // scope 0 at $DIR/issue_91633.rs:+2:27: +2:28
37 _0 = move _2; // scope 1 at $DIR/issue_91633.rs:+3:6: +3:7
38 drop(_2) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
42 StorageDead(_2); // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
43 drop(_1) -> [return: bb4, unwind: bb6]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
47 return; // scope 0 at $DIR/issue_91633.rs:+4:3: +4:3
51 drop(_1) -> bb6; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
55 resume; // scope 0 at $DIR/issue_91633.rs:+0:1: +4:3