about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2017-01-10 20:27:41 +0900
committerGitHub <noreply@github.com>2017-01-10 20:27:41 +0900
commitd350c9b15f3588525c043fd71872506345fd8281 (patch)
tree25023beb5622d2ab673fbdaeeba1626ffce406e4 /src/libstd
parent4d3d2c73970c9842f1a0570963b0a4d1753ae3a9 (diff)
parentca9b07bbc974414e2b9055c5e50e38a1973401d2 (diff)
downloadrust-d350c9b15f3588525c043fd71872506345fd8281.tar.gz
rust-d350c9b15f3588525c043fd71872506345fd8281.zip
Rollup merge of #38664 - apasel422:may-dangle, r=pnkfelix
Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`

CC #34761

r? @pnkfelix
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/table.rs3
-rw-r--r--src/libstd/lib.rs3
-rw-r--r--src/libstd/sync/mutex.rs3
-rw-r--r--src/libstd/sync/rwlock.rs3
4 files changed, 5 insertions, 7 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 2cd9362a657..1ab62130cd3 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -1061,8 +1061,7 @@ impl<K: Clone, V: Clone> Clone for RawTable<K, V> {
     }
 }
 
-impl<K, V> Drop for RawTable<K, V> {
-    #[unsafe_destructor_blind_to_params]
+unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for RawTable<K, V> {
     fn drop(&mut self) {
         if self.capacity == 0 {
             return;
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 9557c520c50..521b938acfb 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -250,13 +250,14 @@
 #![feature(const_fn)]
 #![feature(core_float)]
 #![feature(core_intrinsics)]
-#![feature(dropck_parametricity)]
+#![feature(dropck_eyepatch)]
 #![feature(exact_size_is_empty)]
 #![feature(float_extras)]
 #![feature(float_from_str_radix)]
 #![feature(fn_traits)]
 #![feature(fnbox)]
 #![feature(fused)]
+#![feature(generic_param_attrs)]
 #![feature(hashmap_hasher)]
 #![feature(heap_api)]
 #![feature(inclusive_range)]
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index f6dbe01d7bd..f8426e3b578 100644
--- a/src/libstd/sync/mutex.rs
+++ b/src/libstd/sync/mutex.rs
@@ -280,8 +280,7 @@ impl<T: ?Sized> Mutex<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: ?Sized> Drop for Mutex<T> {
-    #[unsafe_destructor_blind_to_params]
+unsafe impl<#[may_dangle] T: ?Sized> Drop for Mutex<T> {
     fn drop(&mut self) {
         // This is actually safe b/c we know that there is no further usage of
         // this mutex (it's up to the user to arrange for a mutex to get
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 0a11c71706b..adbb98e4b1f 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -310,8 +310,7 @@ impl<T: ?Sized> RwLock<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: ?Sized> Drop for RwLock<T> {
-    #[unsafe_destructor_blind_to_params]
+unsafe impl<#[may_dangle] T: ?Sized> Drop for RwLock<T> {
     fn drop(&mut self) {
         // IMPORTANT: This code needs to be kept in sync with `RwLock::into_inner`.
         unsafe { self.inner.destroy() }