File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -972,8 +972,8 @@ impl<T> MaybeUninit<T> {
972
972
#[ rustc_const_unstable( feature = "maybe_uninit_slice" , issue = "63569" ) ]
973
973
#[ inline( always) ]
974
974
pub const unsafe fn slice_assume_init_ref ( slice : & [ Self ] ) -> & [ T ] {
975
- // SAFETY: casting slice to a `*const [T]` is safe since the caller guarantees that
976
- // `slice` is initialized, and`MaybeUninit` is guaranteed to have the same layout as `T`.
975
+ // SAFETY: casting ` slice` to a `*const [T]` is safe since the caller guarantees that
976
+ // `slice` is initialized, and `MaybeUninit` is guaranteed to have the same layout as `T`.
977
977
// The pointer obtained is valid since it refers to memory owned by `slice` which is a
978
978
// reference and thus guaranteed to be valid for reads.
979
979
unsafe { & * ( slice as * const [ Self ] as * const [ T ] ) }
You can’t perform that action at this time.
0 commit comments