diff options
| author | Andrew Paseltiner <apaseltiner@gmail.com> | 2016-12-28 17:47:10 -0500 |
|---|---|---|
| committer | Andrew Paseltiner <apaseltiner@gmail.com> | 2016-12-28 17:47:10 -0500 |
| commit | ca9b07bbc974414e2b9055c5e50e38a1973401d2 (patch) | |
| tree | ef605bc894cee8fef58f326ea8a3b097275d1dcb /src/libstd/sync | |
| parent | 02b22ec7bd8fa542dd3b08a8497ad5cd3a20c417 (diff) | |
| download | rust-ca9b07bbc974414e2b9055c5e50e38a1973401d2.tar.gz rust-ca9b07bbc974414e2b9055c5e50e38a1973401d2.zip | |
Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`
CC #34761
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/mutex.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 3 |
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() } |
