diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-26 21:23:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-26 21:23:48 +0100 |
| commit | 0029a11d7d3114daa4bbfaad835be89ce0635e58 (patch) | |
| tree | 7ad2610ed3b31c339ca86ca393b4f4c5221b16b0 /library/alloc/src/sync.rs | |
| parent | 20770ac3fc019dcb5c326ce067a636a6b794a0ac (diff) | |
| parent | fc1d7d275ba11e37cf9962f0126ca9ed54b137b4 (diff) | |
| download | rust-0029a11d7d3114daa4bbfaad835be89ce0635e58.tar.gz rust-0029a11d7d3114daa4bbfaad835be89ce0635e58.zip | |
Rollup merge of #122835 - compiler-errors:deref-pure, r=Nadrieril
Require `DerefMut` and `DerefPure` on `deref!()` patterns when appropriate Waiting on the deref pattern syntax pr to merge r? nadrieril
Diffstat (limited to 'library/alloc/src/sync.rs')
| -rw-r--r-- | library/alloc/src/sync.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 7e3e2fb38b1..4dea27221b7 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -21,7 +21,7 @@ use core::marker::{PhantomData, Unsize}; #[cfg(not(no_global_oom_handling))] use core::mem::size_of_val; use core::mem::{self, align_of_val_raw}; -use core::ops::{CoerceUnsized, Deref, DispatchFromDyn, Receiver}; +use core::ops::{CoerceUnsized, Deref, DerefPure, DispatchFromDyn, Receiver}; use core::panic::{RefUnwindSafe, UnwindSafe}; use core::pin::Pin; use core::ptr::{self, NonNull}; @@ -2107,6 +2107,9 @@ impl<T: ?Sized, A: Allocator> Deref for Arc<T, A> { } } +#[unstable(feature = "deref_pure_trait", issue = "87121")] +unsafe impl<T: ?Sized, A: Allocator> DerefPure for Arc<T, A> {} + #[unstable(feature = "receiver_trait", issue = "none")] impl<T: ?Sized> Receiver for Arc<T> {} |
