Skip to content

Commit

Permalink
Rollup merge of #83568 - RalfJung:uninit_array, r=dtolnay
Browse files Browse the repository at this point in the history
update comment at MaybeUninit::uninit_array

#49147 is closed; this now instead needs inline const expressions (#76001).
  • Loading branch information
Dylan-DPC authored Mar 30, 2021
2 parents a0e229a + 5cfc98f commit 9ab5f7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ impl<T> MaybeUninit<T> {
/// Create a new array of `MaybeUninit<T>` items, in an uninitialized state.
///
/// Note: in a future Rust version this method may become unnecessary
/// when array literal syntax allows
/// [repeating const expressions](https://github.com/rust-lang/rust/issues/49147).
/// The example below could then use `let mut buf = [MaybeUninit::<u8>::uninit(); 32];`.
/// when Rust allows
/// [inline const expressions](https://github.com/rust-lang/rust/issues/76001).
/// The example below could then use `let mut buf = [const { MaybeUninit::<u8>::uninit() }; 32];`.
///
/// # Examples
///
Expand Down

0 comments on commit 9ab5f7d

Please sign in to comment.