Fix typo in MaybeUninit::array_assume_init
safety comment
And also add backticks around `MaybeUninit`.
This commit is contained in:
parent
2d11e25794
commit
42405b4fa8
@ -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]>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user