about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-03-30 11:34:23 +0200
committerGitHub <noreply@github.com>2021-03-30 11:34:23 +0200
commit9ab5f7db30910e72675f2e348f352e0e23edb69c (patch)
tree6905e497da343483a32b2146d0867cee52ddf3d5
parenta0e229abadfe47df74625309fba44c0f3b8a0649 (diff)
parent5cfc98fb7fa1cf3ae361790fe7375c9a6b12b72e (diff)
downloadrust-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.rs6
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
     ///