about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-20 15:05:04 +0000
committerbors <bors@rust-lang.org>2019-05-20 15:05:04 +0000
commitd35181ad8785fa958e43580a29a982afe02c728f (patch)
treeb069d7b91879da1f58f1fd61c7a9f14896ec6915 /src/liballoc
parent589beb979c0f1a9736e02e578913db88398c3ba5 (diff)
parent1916391ea8b97389a9ed690b4df614a2b96069fd (diff)
downloadrust-d35181ad8785fa958e43580a29a982afe02c728f.tar.gz
rust-d35181ad8785fa958e43580a29a982afe02c728f.zip
Auto merge of #60445 - RalfJung:maybe-uninit, r=Centril
stabilize core parts of MaybeUninit

and deprecate mem::uninitialized in the future (1.40.0). This is part of implementing https://github.com/rust-lang/rfcs/pull/1892.

Also expand the documentation a bit.

This type is currently primarily useful when dealing with partially initialized arrays. In libstd, it is used e.g. in `BTreeMap` (with some unstable APIs that however can all be replaced, less ergonomically, by stable ones). What we stabilize should also be enough for `SmallVec` (Cc @bluss).

Making this useful for structs requires https://github.com/rust-lang/rfcs/pull/2582 or a commitment that references to uninitialized data are not insta-UB.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 2edd946ff11..d90036eaf49 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -109,7 +109,7 @@
 #![feature(rustc_const_unstable)]
 #![feature(const_vec_new)]
 #![feature(slice_partition_dedup)]
-#![feature(maybe_uninit, maybe_uninit_slice, maybe_uninit_array)]
+#![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_array)]
 #![feature(alloc_layout_extra)]
 #![feature(try_trait)]
 #![feature(iter_nth_back)]