From b5ab2c7f1cf31a642c826047ed1025f4fc13d879 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Feb 2019 20:00:16 +0100 Subject: split MaybeUninit into several features, expand docs a bit --- src/liballoc/collections/btree/node.rs | 4 ++-- src/liballoc/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs index eb0667228d1..fc1c1878924 100644 --- a/src/liballoc/collections/btree/node.rs +++ b/src/liballoc/collections/btree/node.rs @@ -453,7 +453,7 @@ impl NodeRef { root: self.root, _marker: PhantomData }, - idx: unsafe { usize::from(*self.as_header().parent_idx.get_ref()) }, + idx: unsafe { usize::from(*self.as_header().parent_idx.as_ptr()) }, _marker: PhantomData }) } else { @@ -1143,7 +1143,7 @@ impl NodeRef { height: self.node.height - 1, node: unsafe { - self.node.as_internal().edges.get_unchecked(self.idx).get_ref().as_ptr() + (&*self.node.as_internal().edges.get_unchecked(self.idx).as_ptr()).as_ptr() }, root: self.node.root, _marker: PhantomData diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index d4ee428a3b5..2f23a697a58 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)] #![feature(alloc_layout_extra)] #![feature(try_trait)] -- cgit 1.4.1-3-g733a5 From 95ef9b4fc28ad2f5db078eb1ae233fd5be76806b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Feb 2019 22:31:06 +0100 Subject: make Centril happy --- src/liballoc/lib.rs | 2 +- src/libcore/lib.rs | 2 +- src/libcore/macros.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 2f23a697a58..d0b06d6bae5 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, maybe_uninit_slice)] +#![feature(maybe_uninit, maybe_uninit_slice, maybe_uninit_array)] #![feature(alloc_layout_extra)] #![feature(try_trait)] diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 2c0d0dd1490..d046236b535 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -122,7 +122,7 @@ #![feature(structural_match)] #![feature(abi_unadjusted)] #![feature(adx_target_feature)] -#![feature(maybe_uninit, maybe_uninit_slice)] +#![feature(maybe_uninit, maybe_uninit_slice, maybe_uninit_array)] #![feature(unrestricted_attribute_tokens)] #[prelude_import] diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 02f8065eb21..fdbfa56000b 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -567,7 +567,7 @@ macro_rules! unimplemented { /// /// [`MaybeUninit`]: mem/union.MaybeUninit.html #[macro_export] -#[unstable(feature = "maybe_uninit_slice", issue = "53491")] +#[unstable(feature = "maybe_uninit_array", issue = "53491")] macro_rules! uninitialized_array { // This `into_initialized` is safe because an array of `MaybeUninit` does not // require initialization. -- cgit 1.4.1-3-g733a5