// 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 _7: *const u8; let mut _8: usize; scope 3 (inlined Vec::::as_ptr) { debug self => _1; let mut _6: *mut u8; scope 4 (inlined alloc::raw_vec::RawVec::::ptr) { scope 5 (inlined alloc::raw_vec::RawVecInner::ptr::) { let mut _5: std::ptr::NonNull; 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::) { let mut _3: *mut u8; let mut _4: *const u8; scope 9 (inlined NonNull::::as_ptr) { } } } scope 10 (inlined Unique::::as_non_null_ptr) { } } scope 11 (inlined NonNull::::as_ptr) { } } } } scope 12 (inlined std::slice::from_raw_parts::<'_, u8>) { debug data => _7; debug len => _8; let _9: *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 align_of::) { } scope 17 (inlined slice_from_raw_parts::) { debug data => _7; debug len => _8; scope 18 (inlined std::ptr::from_raw_parts::<[u8], u8>) { debug data_pointer => _7; } } } } } bb0: { StorageLive(_6); StorageLive(_7); StorageLive(_5); StorageLive(_2); _2 = copy (((((*_1).0: alloc::raw_vec::RawVec).0: alloc::raw_vec::RawVecInner).0: std::ptr::Unique).0: std::ptr::NonNull); StorageLive(_3); StorageLive(_4); _3 = copy _2 as *mut u8 (Transmute); _4 = copy _3 as *const u8 (PtrToPtr); _5 = NonNull:: { pointer: move _4 }; StorageDead(_4); StorageDead(_3); StorageDead(_2); _6 = copy _5 as *mut u8 (Transmute); StorageDead(_5); _7 = copy _6 as *const u8 (PtrToPtr); StorageLive(_8); _8 = copy ((*_1).1: usize); StorageLive(_9); _9 = *const [u8] from (copy _7, copy _8); _0 = &(*_9); StorageDead(_9); StorageDead(_8); StorageDead(_7); StorageDead(_6); return; } }