Skip to content

Commit 42405b4

Browse files
committed
Fix typo in MaybeUninit::array_assume_init safety comment
And also add backticks around `MaybeUninit`.
1 parent 2d11e25 commit 42405b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/mem/maybe_uninit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ impl<T> MaybeUninit<T> {
870870
// SAFETY:
871871
// * The caller guarantees that all elements of the array are initialized
872872
// * `MaybeUninit<T>` and T are guaranteed to have the same layout
873-
// * MaybeUnint does not drop, so there are no double-frees
873+
// * `MaybeUninit` does not drop, so there are no double-frees
874874
// And thus the conversion is safe
875875
unsafe {
876876
intrinsics::assert_inhabited::<[T; N]>();

0 commit comments

Comments
 (0)