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
GuillaumeGomez authored May 5, 2021
2 parents 5e827a7 + 42405b4 commit fa96987
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 fa96987

Please sign in to comment.