diff options
| author | bors <bors@rust-lang.org> | 2024-03-26 22:25:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-26 22:25:03 +0000 |
| commit | a1b499134a62130871382b5ea381b2f18c5033cd (patch) | |
| tree | 3ea9129cbc89f1d2add43237144ae3160d441634 /library/alloc/src | |
| parent | 47ecded3525392b77843534bed69b4302f9af8d2 (diff) | |
| parent | 781b225831dc9ca60ce60276cc40dff419938c52 (diff) | |
Auto merge of #123108 - matthiaskrgr:rollup-zossklv, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #108675 (Document `adt_const_params` feature in Unstable Book) - #122120 (Suggest associated type bounds on problematic associated equality bounds) - #122589 (Fix diagnostics for async block cloning) - #122835 (Require `DerefMut` and `DerefPure` on `deref!()` patterns when appropriate) - #123049 (In `ConstructCoroutineInClosureShim`, pass receiver by mut ref, not mut pointer) - #123055 (enable cargo miri test doctests) - #123057 (unix fs: Make hurd using explicit new rather than From) - #123087 (Change `f16` and `f128` clippy stubs to be nonpanicking) - #123103 (Rename `Inherited` -> `TypeckRootCtxt`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/boxed.rs | 5 | ||||
| -rw-r--r-- | library/alloc/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/rc.rs | 5 | ||||
| -rw-r--r-- | library/alloc/src/string.rs | 3 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 5 | ||||
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 3 |
6 files changed, 19 insertions, 3 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index cfaf533088a..7c3fa2312e5 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -161,7 +161,7 @@ use core::marker::Unsize; use core::mem::{self, SizedTypeProperties}; use core::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce}; use core::ops::{ - CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut, DispatchFromDyn, Receiver, + CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut, DerefPure, DispatchFromDyn, Receiver, }; use core::pin::Pin; use core::ptr::{self, addr_of_mut, NonNull, Unique}; @@ -1939,6 +1939,9 @@ impl<T: ?Sized, A: Allocator> DerefMut for Box<T, A> { } } +#[unstable(feature = "deref_pure_trait", issue = "87121")] +unsafe impl<T: ?Sized, A: Allocator> DerefPure for Box<T, A> {} + #[unstable(feature = "receiver_trait", issue = "none")] impl<T: ?Sized, A: Allocator> Receiver for Box<T, A> {} diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 02d155aaf12..ebc30c08910 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -122,6 +122,7 @@ #![feature(const_waker)] #![feature(core_intrinsics)] #![feature(deprecated_suggestion)] +#![feature(deref_pure_trait)] #![feature(dispatch_from_dyn)] #![feature(error_generic_member_access)] #![feature(error_in_core)] diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index facfc9d208e..569db54b137 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -260,7 +260,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, forget, ManuallyDrop}; -use core::ops::{CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Receiver}; +use core::ops::{CoerceUnsized, Deref, DerefMut, DerefPure, DispatchFromDyn, Receiver}; use core::panic::{RefUnwindSafe, UnwindSafe}; #[cfg(not(no_global_oom_handling))] use core::pin::Pin; @@ -2126,6 +2126,9 @@ impl<T: ?Sized, A: Allocator> Deref for Rc<T, A> { } } +#[unstable(feature = "deref_pure_trait", issue = "87121")] +unsafe impl<T: ?Sized, A: Allocator> DerefPure for Rc<T, A> {} + #[unstable(feature = "receiver_trait", issue = "none")] impl<T: ?Sized> Receiver for Rc<T> {} diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 7dba5b4e1f9..7464df268cc 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -2479,6 +2479,9 @@ impl ops::Deref for String { } } +#[unstable(feature = "deref_pure_trait", issue = "87121")] +unsafe impl ops::DerefPure for String {} + #[stable(feature = "derefmut_for_string", since = "1.3.0")] impl ops::DerefMut for String { #[inline] 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> {} diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 94bed825bb2..3062f8664b7 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2772,6 +2772,9 @@ impl<T, A: Allocator> ops::DerefMut for Vec<T, A> { } } +#[unstable(feature = "deref_pure_trait", issue = "87121")] +unsafe impl<T, A: Allocator> ops::DerefPure for Vec<T, A> {} + #[cfg(not(no_global_oom_handling))] #[stable(feature = "rust1", since = "1.0.0")] impl<T: Clone, A: Allocator + Clone> Clone for Vec<T, A> { |
