Skip to content

Commit 9ab5f7d

Browse files
authored
Rollup merge of #83568 - RalfJung:uninit_array, r=dtolnay
update comment at MaybeUninit::uninit_array #49147 is closed; this now instead needs inline const expressions (#76001).
2 parents a0e229a + 5cfc98f commit 9ab5f7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/mem/maybe_uninit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ impl<T> MaybeUninit<T> {
319319
/// Create a new array of `MaybeUninit<T>` items, in an uninitialized state.
320320
///
321321
/// Note: in a future Rust version this method may become unnecessary
322-
/// when array literal syntax allows
323-
/// [repeating const expressions](https://github.com/rust-lang/rust/issues/49147).
324-
/// The example below could then use `let mut buf = [MaybeUninit::<u8>::uninit(); 32];`.
322+
/// when Rust allows
323+
/// [inline const expressions](https://github.com/rust-lang/rust/issues/76001).
324+
/// The example below could then use `let mut buf = [const { MaybeUninit::<u8>::uninit() }; 32];`.
325325
///
326326
/// # Examples
327327
///

0 commit comments

Comments
 (0)