diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-03-30 11:34:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-30 11:34:23 +0200 |
| commit | 9ab5f7db30910e72675f2e348f352e0e23edb69c (patch) | |
| tree | 6905e497da343483a32b2146d0867cee52ddf3d5 | |
| parent | a0e229abadfe47df74625309fba44c0f3b8a0649 (diff) | |
| parent | 5cfc98fb7fa1cf3ae361790fe7375c9a6b12b72e (diff) | |
| download | rust-9ab5f7db30910e72675f2e348f352e0e23edb69c.tar.gz rust-9ab5f7db30910e72675f2e348f352e0e23edb69c.zip | |
Rollup merge of #83568 - RalfJung:uninit_array, r=dtolnay
update comment at MaybeUninit::uninit_array https://github.com/rust-lang/rust/issues/49147 is closed; this now instead needs inline const expressions (#76001).
| -rw-r--r-- | library/core/src/mem/maybe_uninit.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index cb072931232..337f0e847bb 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -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 /// |
