Skip to content

Commit 3995643

Browse files
authored
Rollup merge of rust-lang#83568 - RalfJung:uninit_array, r=dtolnay
update comment at MaybeUninit::uninit_array rust-lang#49147 is closed; this now instead needs inline const expressions (rust-lang#76001).
2 parents 41ed329 + 16fc113 commit 3995643

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)