// MIR for `vec_deref_to_slice` after PreCodegen fn vec_deref_to_slice(_1: &Vec) -> &[u8] { debug v => _1; let mut _0: &[u8]; scope 1 (inlined as Deref>::deref) { debug self => _1; scope 2 (inlined Vec::::as_slice) { debug self => _1; let mut _3: *const u8; let mut _4: usize; scope 3 (inlined Vec::::as_ptr) { debug self => _1; scope 4 (inlined alloc::raw_vec::RawVec::::ptr) { scope 5 (inlined alloc::raw_vec::RawVecInner::ptr::) { scope 6 (inlined alloc::raw_vec::RawVecInner::non_null::) { let mut _2: std::ptr::NonNull; scope 7 (inlined Unique::::cast::) { scope 8 (inlined NonNull::::cast::) { scope 9 (inlined NonNull::::as_ptr) { } } } scope 10 (inlined Unique::::as_non_null_ptr) { } } scope 11 (inlined NonNull::::as_ptr) { } } } } scope 12 (inlined #[track_caller] std::slice::from_raw_parts::<'_, u8>) { debug data => _3; debug len => _4; let _5: *const [u8]; 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::) { } scope 16 (inlined std::mem::align_of::) { } scope 17 (inlined slice_from_raw_parts::) { debug data => _3; debug len => _4; scope 18 (inlined std::ptr::from_raw_parts::<[u8], u8>) { debug data_pointer => _3; } } } } } bb0: { StorageLive(_2); StorageLive(_3); _2 = copy (((((*_1).0: alloc::raw_vec::RawVec).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique).0: std::ptr::NonNull); _3 = copy _2 as *const u8 (Transmute); StorageLive(_4); _4 = copy ((*_1).1: usize); StorageLive(_5); _5 = *const [u8] from (copy _3, copy _4); _0 = &(*_5); StorageDead(_5); StorageDead(_4); StorageDead(_3); StorageDead(_2); return; } }