about summary refs log tree commit diff
path: root/src/libstd/sync
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/sync
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/sync')
-rw-r--r--src/libstd/sync/mutex.rs3
-rw-r--r--src/libstd/sync/rwlock.rs3
2 files changed, 2 insertions, 4 deletions
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() }