2024-03-29 02:37:31 -05:00
|
|
|
// MIR for `vec_deref_to_slice` after PreCodegen
|
|
|
|
|
|
|
|
fn vec_deref_to_slice(_1: &Vec<u8>) -> &[u8] {
|
|
|
|
debug v => _1;
|
|
|
|
let mut _0: &[u8];
|
2024-04-11 19:01:27 -05:00
|
|
|
scope 1 (inlined <Vec<u8> as Deref>::deref) {
|
|
|
|
debug self => _1;
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 2 (inlined Vec::<u8>::as_slice) {
|
2024-04-11 19:01:27 -05:00
|
|
|
debug self => _1;
|
2024-10-30 08:11:37 -05:00
|
|
|
let mut _7: usize;
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 3 (inlined Vec::<u8>::as_ptr) {
|
|
|
|
debug self => _1;
|
|
|
|
let mut _2: &alloc::raw_vec::RawVec<u8>;
|
|
|
|
scope 4 (inlined alloc::raw_vec::RawVec::<u8>::ptr) {
|
|
|
|
debug self => _2;
|
|
|
|
let mut _3: &alloc::raw_vec::RawVecInner;
|
|
|
|
scope 5 (inlined alloc::raw_vec::RawVecInner::ptr::<u8>) {
|
2024-04-11 19:01:27 -05:00
|
|
|
debug self => _3;
|
2024-10-30 08:11:37 -05:00
|
|
|
let mut _6: std::ptr::NonNull<u8>;
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 6 (inlined alloc::raw_vec::RawVecInner::non_null::<u8>) {
|
|
|
|
debug self => _3;
|
|
|
|
let mut _4: std::ptr::NonNull<u8>;
|
|
|
|
scope 7 (inlined Unique::<u8>::cast::<u8>) {
|
|
|
|
debug ((self: Unique<u8>).0: std::ptr::NonNull<u8>) => _4;
|
|
|
|
debug ((self: Unique<u8>).1: std::marker::PhantomData<u8>) => const PhantomData::<u8>;
|
|
|
|
scope 8 (inlined NonNull::<u8>::cast::<u8>) {
|
2024-06-21 11:28:03 -05:00
|
|
|
debug self => _4;
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 9 (inlined NonNull::<u8>::as_ptr) {
|
|
|
|
debug self => _4;
|
|
|
|
let mut _5: *const u8;
|
|
|
|
}
|
2024-06-21 11:28:03 -05:00
|
|
|
}
|
|
|
|
}
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 10 (inlined Unique::<u8>::as_non_null_ptr) {
|
2024-10-30 08:11:37 -05:00
|
|
|
debug ((self: Unique<u8>).0: std::ptr::NonNull<u8>) => _6;
|
2024-07-30 08:48:36 -05:00
|
|
|
debug ((self: Unique<u8>).1: std::marker::PhantomData<u8>) => const PhantomData::<u8>;
|
2024-06-21 11:28:03 -05:00
|
|
|
}
|
|
|
|
}
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 11 (inlined NonNull::<u8>::as_ptr) {
|
2024-10-30 08:11:37 -05:00
|
|
|
debug self => _6;
|
2024-07-30 08:48:36 -05:00
|
|
|
}
|
2024-06-21 11:28:03 -05:00
|
|
|
}
|
2024-04-11 19:01:27 -05:00
|
|
|
}
|
|
|
|
}
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 12 (inlined std::slice::from_raw_parts::<'_, u8>) {
|
2024-06-21 11:28:03 -05:00
|
|
|
debug data => _5;
|
2024-10-30 08:11:37 -05:00
|
|
|
debug len => _7;
|
|
|
|
let _8: *const [u8];
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 13 (inlined core::ub_checks::check_language_ub) {
|
|
|
|
scope 14 (inlined core::ub_checks::check_language_ub::runtime) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 15 (inlined std::mem::size_of::<u8>) {
|
|
|
|
}
|
|
|
|
scope 16 (inlined align_of::<u8>) {
|
|
|
|
}
|
|
|
|
scope 17 (inlined slice_from_raw_parts::<u8>) {
|
|
|
|
debug data => _5;
|
2024-10-30 08:11:37 -05:00
|
|
|
debug len => _7;
|
2024-07-30 08:48:36 -05:00
|
|
|
scope 18 (inlined std::ptr::from_raw_parts::<[u8], u8>) {
|
|
|
|
debug data_pointer => _5;
|
2024-10-30 08:11:37 -05:00
|
|
|
debug metadata => _7;
|
2024-07-30 08:48:36 -05:00
|
|
|
}
|
2024-05-28 21:00:37 -05:00
|
|
|
}
|
2024-04-11 19:01:27 -05:00
|
|
|
}
|
|
|
|
}
|
2024-03-29 02:37:31 -05:00
|
|
|
}
|
|
|
|
|
2024-04-11 19:01:27 -05:00
|
|
|
bb0: {
|
|
|
|
StorageLive(_2);
|
|
|
|
_2 = &((*_1).0: alloc::raw_vec::RawVec<u8>);
|
|
|
|
StorageLive(_3);
|
2024-06-21 11:28:03 -05:00
|
|
|
_3 = &(((*_1).0: alloc::raw_vec::RawVec<u8>).0: alloc::raw_vec::RawVecInner);
|
2024-10-30 08:11:37 -05:00
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_4);
|
2024-06-21 11:28:03 -05:00
|
|
|
_4 = copy (((((*_1).0: alloc::raw_vec::RawVec<u8>).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique<u8>).0: std::ptr::NonNull<u8>);
|
|
|
|
_5 = copy (_4.0: *const u8);
|
2024-10-30 08:11:37 -05:00
|
|
|
_6 = NonNull::<u8> { pointer: copy _5 };
|
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_6);
|
2024-06-21 11:28:03 -05:00
|
|
|
StorageDead(_3);
|
|
|
|
StorageDead(_2);
|
|
|
|
StorageLive(_7);
|
2024-10-30 08:11:37 -05:00
|
|
|
_7 = copy ((*_1).1: usize);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = *const [u8] from (copy _5, copy _7);
|
|
|
|
_0 = &(*_8);
|
|
|
|
StorageDead(_8);
|
2024-06-21 11:28:03 -05:00
|
|
|
StorageDead(_7);
|
2024-03-29 02:37:31 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|