Skip to content

Commit 1ac1f24

Browse files
authored
Rollup merge of #92050 - r00ster91:patch-5, r=camelid
Add a space and 2 grave accents I only noticed this because I have this implementation copy pasted in some places in my code and I really can't wait for this to be stabilized...
2 parents fd25904 + afdd356 commit 1ac1f24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/mem/maybe_uninit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,8 @@ impl<T> MaybeUninit<T> {
972972
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
973973
#[inline(always)]
974974
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`.
977977
// The pointer obtained is valid since it refers to memory owned by `slice` which is a
978978
// reference and thus guaranteed to be valid for reads.
979979
unsafe { &*(slice as *const [Self] as *const [T]) }

0 commit comments

Comments
 (0)