2022-09-05 03:00:31 +00:00
|
|
|
// MIR for `bar` after built
|
2022-08-13 15:13:20 +00:00
|
|
|
|
|
|
|
fn bar(_1: Box<[T]>) -> () {
|
2023-06-06 13:47:00 +00:00
|
|
|
debug it => _1;
|
|
|
|
let mut _0: ();
|
|
|
|
let mut _2: &<[T] as std::ops::Index<usize>>::Output;
|
|
|
|
let mut _3: &[T];
|
2022-08-13 15:13:20 +00:00
|
|
|
scope 1 {
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_2);
|
|
|
|
StorageLive(_3);
|
|
|
|
_3 = &(*_1);
|
|
|
|
_2 = <[T] as Index<usize>>::index(move _3, const 0_usize) -> [return: bb1, unwind: bb3];
|
2022-08-13 15:13:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_3);
|
|
|
|
PlaceMention((*_2));
|
|
|
|
StorageDead(_2);
|
|
|
|
_0 = const ();
|
|
|
|
drop(_1) -> [return: bb2, unwind: bb4];
|
2022-08-13 15:13:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 13:47:00 +00:00
|
|
|
return;
|
2022-08-13 15:13:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3 (cleanup): {
|
2023-08-21 07:57:10 +00:00
|
|
|
drop(_1) -> [return: bb4, unwind terminate (panic in a destructor during cleanup)];
|
2022-08-13 15:13:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4 (cleanup): {
|
2023-06-06 13:47:00 +00:00
|
|
|
resume;
|
2022-08-13 15:13:20 +00:00
|
|
|
}
|
|
|
|
}
|