From f19baf0977b176ba26277af479a19b71b7ee1fdb Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 22 Dec 2017 18:58:39 +0100 Subject: Rename std::ptr::Shared to NonNull `Shared` is now a deprecated `type` alias. CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629 --- src/libstd/collections/hash/table.rs | 6 +++--- src/libstd/lib.rs | 2 +- src/libstd/panic.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 96f98efe4aa..73bd5747c10 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -16,7 +16,7 @@ use marker; use mem::{align_of, size_of, needs_drop}; use mem; use ops::{Deref, DerefMut}; -use ptr::{self, Unique, Shared}; +use ptr::{self, Unique, NonNull}; use self::BucketState::*; @@ -873,7 +873,7 @@ impl RawTable { elems_left, marker: marker::PhantomData, }, - table: Shared::from(self), + table: NonNull::from(self), marker: marker::PhantomData, } } @@ -1020,7 +1020,7 @@ impl IntoIter { /// Iterator over the entries in a table, clearing the table. pub struct Drain<'a, K: 'a, V: 'a> { - table: Shared>, + table: NonNull>, iter: RawBuckets<'static, K, V>, marker: marker::PhantomData<&'a RawTable>, } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index bb38fc55091..8a1ba32f7dc 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -283,6 +283,7 @@ #![feature(macro_vis_matcher)] #![feature(needs_panic_runtime)] #![feature(never_type)] +#![feature(nonnull)] #![feature(num_bits_bytes)] #![feature(old_wrapping)] #![feature(on_unimplemented)] @@ -297,7 +298,6 @@ #![feature(raw)] #![feature(repr_align)] #![feature(rustc_attrs)] -#![feature(shared)] #![feature(sip_hash_13)] #![feature(slice_bytes)] #![feature(slice_concat_ext)] diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index 53c2211745c..68584b7cf25 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -17,7 +17,7 @@ use cell::UnsafeCell; use fmt; use ops::{Deref, DerefMut}; use panicking; -use ptr::{Unique, Shared}; +use ptr::{Unique, NonNull}; use rc::Rc; use sync::{Arc, Mutex, RwLock, atomic}; use thread::Result; @@ -198,8 +198,8 @@ impl UnwindSafe for *const T {} impl UnwindSafe for *mut T {} #[unstable(feature = "unique", issue = "27730")] impl UnwindSafe for Unique {} -#[unstable(feature = "shared", issue = "27730")] -impl UnwindSafe for Shared {} +#[unstable(feature = "nonnull", issue = "27730")] +impl UnwindSafe for NonNull {} #[stable(feature = "catch_unwind", since = "1.9.0")] impl UnwindSafe for Mutex {} #[stable(feature = "catch_unwind", since = "1.9.0")] -- cgit 1.4.1-3-g733a5