diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-18 14:49:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-18 14:49:45 +0100 |
| commit | 1ac1f24ddd54865f1719eb8c0e48c4858be1b744 (patch) | |
| tree | a563ec00acbc5b567066b9bb23ff0ef5776988e2 | |
| parent | fd259040d9990ca695c2f3a65a81ac4d15c25436 (diff) | |
| parent | afdd3561dea97d34b75eea878a325f29ab4d80de (diff) | |
| download | rust-1ac1f24ddd54865f1719eb8c0e48c4858be1b744.tar.gz rust-1ac1f24ddd54865f1719eb8c0e48c4858be1b744.zip | |
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...
| -rw-r--r-- | library/core/src/mem/maybe_uninit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index 783a4b08ec1..3b0e4a31db1 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -972,8 +972,8 @@ impl<T> MaybeUninit<T> { #[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")] #[inline(always)] pub const unsafe fn slice_assume_init_ref(slice: &[Self]) -> &[T] { - // SAFETY: casting slice to a `*const [T]` is safe since the caller guarantees that - // `slice` is initialized, and`MaybeUninit` is guaranteed to have the same layout as `T`. + // SAFETY: casting `slice` to a `*const [T]` is safe since the caller guarantees that + // `slice` is initialized, and `MaybeUninit` is guaranteed to have the same layout as `T`. // The pointer obtained is valid since it refers to memory owned by `slice` which is a // reference and thus guaranteed to be valid for reads. unsafe { &*(slice as *const [Self] as *const [T]) } |
