about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-12-22 18:58:39 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-01-20 10:55:16 +0100
commitf19baf0977b176ba26277af479a19b71b7ee1fdb (patch)
tree7c6eb9b86822c1dbca2535ea0b34569e3d65eb7a /src/libstd
parentba5d7a66e847f5713633cb792c379a11b774e21f (diff)
downloadrust-f19baf0977b176ba26277af479a19b71b7ee1fdb.tar.gz
rust-f19baf0977b176ba26277af479a19b71b7ee1fdb.zip
Rename std::ptr::Shared to NonNull
`Shared` is now a deprecated `type` alias.

CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/table.rs6
-rw-r--r--src/libstd/lib.rs2
-rw-r--r--src/libstd/panic.rs6
3 files changed, 7 insertions, 7 deletions
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<K, V> RawTable<K, V> {
                 elems_left,
                 marker: marker::PhantomData,
             },
-            table: Shared::from(self),
+            table: NonNull::from(self),
             marker: marker::PhantomData,
         }
     }
@@ -1020,7 +1020,7 @@ impl<K, V> IntoIter<K, V> {
 
 /// Iterator over the entries in a table, clearing the table.
 pub struct Drain<'a, K: 'a, V: 'a> {
-    table: Shared<RawTable<K, V>>,
+    table: NonNull<RawTable<K, V>>,
     iter: RawBuckets<'static, K, V>,
     marker: marker::PhantomData<&'a RawTable<K, V>>,
 }
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<T: RefUnwindSafe + ?Sized> UnwindSafe for *const T {}
 impl<T: RefUnwindSafe + ?Sized> UnwindSafe for *mut T {}
 #[unstable(feature = "unique", issue = "27730")]
 impl<T: UnwindSafe + ?Sized> UnwindSafe for Unique<T> {}
-#[unstable(feature = "shared", issue = "27730")]
-impl<T: RefUnwindSafe + ?Sized> UnwindSafe for Shared<T> {}
+#[unstable(feature = "nonnull", issue = "27730")]
+impl<T: RefUnwindSafe + ?Sized> UnwindSafe for NonNull<T> {}
 #[stable(feature = "catch_unwind", since = "1.9.0")]
 impl<T: ?Sized> UnwindSafe for Mutex<T> {}
 #[stable(feature = "catch_unwind", since = "1.9.0")]