about summary refs log tree commit diff
path: root/src/liballoc/lib.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-02-16 00:56:00 +0800
committerkennytm <kennytm@gmail.com>2019-02-16 14:11:55 +0800
commit9a2437c0dc1f88eac3ca4c57ca005b2386a30a29 (patch)
tree161f1a449cc0ca20c675d4318798f9b5f505c57c /src/liballoc/lib.rs
parent762b988a0a7740d6a9b5f99932036a4ae03dd6cb (diff)
parent95ef9b4fc28ad2f5db078eb1ae233fd5be76806b (diff)
downloadrust-9a2437c0dc1f88eac3ca4c57ca005b2386a30a29.tar.gz
rust-9a2437c0dc1f88eac3ca4c57ca005b2386a30a29.zip
Rollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centril
split MaybeUninit into several features, expand docs a bit

This splits the `maybe_uninit` feature gate into several:

* `maybe_uninit` for what we will hopefully stabilize soon-ish.
* `maybe_uninit_ref` for creating references into `MaybeUninit`, for which the rules are not yet clear.
* `maybe_uninit_slice` for handling slices of `MaybeUninit`, which needs more API design work.
* `maybe_uninit_array` for creating arrays of `MaybeUninit` using a macro (because we don't have https://github.com/rust-lang/rust/issues/49147 yet).

Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use `get_ref` and `get_mut`.

I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.
Diffstat (limited to 'src/liballoc/lib.rs')
-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 95b9dacf856..440ce8ac5e8 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -112,7 +112,7 @@
 #![feature(rustc_const_unstable)]
 #![feature(const_vec_new)]
 #![feature(slice_partition_dedup)]
-#![feature(maybe_uninit)]
+#![feature(maybe_uninit, maybe_uninit_slice, maybe_uninit_array)]
 #![feature(alloc_layout_extra)]
 #![feature(try_trait)]