Skip to content

Commit

Permalink
Fix typo in MaybeUninit::array_assume_init safety comment
Browse files Browse the repository at this point in the history
And also add backticks around `MaybeUninit`.
  • Loading branch information
sdroege committed May 5, 2021
1 parent 2d11e25 commit 42405b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]>();
Expand Down

0 comments on commit 42405b4

Please sign in to comment.