Skip to content

Commit

Permalink
Rollup merge of rust-lang#84949 - sdroege:maybe-unint-typo, r=m-ou-se
Browse files Browse the repository at this point in the history
Fix typo in `MaybeUninit::array_assume_init` safety comment

And also add backticks around `MaybeUninit`.
  • Loading branch information
Dylan-DPC authored May 6, 2021
2 parents b39024d + 42405b4 commit 0c94c4b
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 0c94c4b

Please sign in to comment.