diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-28 01:28:32 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-04 17:45:18 +0000 |
| commit | 3d62b279ddc2095b94aa5921540b27f3003365ff (patch) | |
| tree | 5444523a2fbfeceb8165ab86e2b5d64e7a76338c /compiler/rustc_data_structures | |
| parent | fd17deacce374a4185c882795be162e17b557050 (diff) | |
| download | rust-3d62b279ddc2095b94aa5921540b27f3003365ff.tar.gz rust-3d62b279ddc2095b94aa5921540b27f3003365ff.zip | |
Ensure that negative auto impls are always applicable
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/marker.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs index 6ae97222f77..4cacc269709 100644 --- a/compiler/rustc_data_structures/src/marker.rs +++ b/compiler/rustc_data_structures/src/marker.rs @@ -1,3 +1,5 @@ +use std::alloc::Allocator; + #[rustc_on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \ Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")] // This is an auto trait for types which can be sent across threads if `sync::is_dyn_thread_safe()` @@ -28,8 +30,8 @@ impls_dyn_send_neg!( [*const T where T: ?Sized] [*mut T where T: ?Sized] [std::ptr::NonNull<T> where T: ?Sized] - [std::rc::Rc<T> where T: ?Sized] - [std::rc::Weak<T> where T: ?Sized] + [std::rc::Rc<T, A> where T: ?Sized, A: Allocator] + [std::rc::Weak<T, A> where T: ?Sized, A: Allocator] [std::sync::MutexGuard<'_, T> where T: ?Sized] [std::sync::RwLockReadGuard<'_, T> where T: ?Sized] [std::sync::RwLockWriteGuard<'_, T> where T: ?Sized] @@ -96,8 +98,8 @@ impls_dyn_sync_neg!( [std::cell::RefCell<T> where T: ?Sized] [std::cell::UnsafeCell<T> where T: ?Sized] [std::ptr::NonNull<T> where T: ?Sized] - [std::rc::Rc<T> where T: ?Sized] - [std::rc::Weak<T> where T: ?Sized] + [std::rc::Rc<T, A> where T: ?Sized, A: Allocator] + [std::rc::Weak<T, A> where T: ?Sized, A: Allocator] [std::cell::OnceCell<T> where T] [std::sync::mpsc::Receiver<T> where T] [std::sync::mpsc::Sender<T> where T] |
