Fix typo in MaybeUninit::array_assume_init safety comment

And also add backticks around `MaybeUninit`.
This commit is contained in:
Sebastian Dröge 2021-05-05 12:31:38 +03:00
parent 2d11e25794
commit 42405b4fa8

View File

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