diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 579f54c5f715b..5b9b0e106d254 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -30,8 +30,6 @@ #![feature(get_mut_unchecked)] #![feature(lint_reasons)] #![feature(unwrap_infallible)] -#![feature(const_mut_refs)] -#![feature(const_trait_impl)] #![feature(strict_provenance)] #![feature(ptr_alignment_type)] #![feature(macro_metavar_expr)] diff --git a/compiler/rustc_data_structures/src/marker.rs b/compiler/rustc_data_structures/src/marker.rs index e23a10839ee17..f8c06f9a8145e 100644 --- a/compiler/rustc_data_structures/src/marker.rs +++ b/compiler/rustc_data_structures/src/marker.rs @@ -94,6 +94,7 @@ cfg_if!( [Box where T: ?Sized + DynSend, A: std::alloc::Allocator + DynSend] [crate::sync::Lock where T: DynSend] [crate::sync::RwLock where T: DynSend] + [crate::tagged_ptr::CopyTaggedPtr where P: Send + crate::tagged_ptr::Pointer, T: Send + crate::tagged_ptr::Tag, const CP: bool] [rustc_arena::TypedArena where T: DynSend] [indexmap::IndexSet where V: DynSend, S: DynSend] [indexmap::IndexMap where K: DynSend, V: DynSend, S: DynSend] @@ -175,6 +176,7 @@ cfg_if!( [crate::sync::OneThread where T] [crate::sync::WorkerLocal where T: DynSend] [crate::intern::Interned<'a, T> where 'a, T: DynSync] + [crate::tagged_ptr::CopyTaggedPtr where P: Sync + crate::tagged_ptr::Pointer, T: Sync + crate::tagged_ptr::Tag, const CP: bool] [parking_lot::lock_api::Mutex where R: DynSync, T: ?Sized + DynSend] [parking_lot::lock_api::RwLock where R: DynSync, T: ?Sized + DynSend + DynSync] [indexmap::IndexSet where V: DynSync, S: DynSync] @@ -218,9 +220,10 @@ unsafe impl Send for FromDyn {} #[cfg(parallel_compiler)] unsafe impl Sync for FromDyn {} -impl const std::ops::Deref for FromDyn { +impl std::ops::Deref for FromDyn { type Target = T; + #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } @@ -237,15 +240,17 @@ unsafe impl DynSend for IntoDynSyncSend {} #[cfg(parallel_compiler)] unsafe impl DynSync for IntoDynSyncSend {} -impl const std::ops::Deref for IntoDynSyncSend { +impl std::ops::Deref for IntoDynSyncSend { type Target = T; + #[inline(always)] fn deref(&self) -> &T { &self.0 } } -impl const std::ops::DerefMut for IntoDynSyncSend { +impl std::ops::DerefMut for IntoDynSyncSend { + #[inline(always)] fn deref_mut(&mut self) -> &mut T { &mut self.0 } diff --git a/compiler/rustc_middle/src/ty/query.rs b/compiler/rustc_middle/src/ty/query.rs index 1d09a62ca17c9..07d47cae5ee93 100644 --- a/compiler/rustc_middle/src/ty/query.rs +++ b/compiler/rustc_middle/src/ty/query.rs @@ -52,8 +52,9 @@ use rustc_data_structures::fingerprint::Fingerprint; use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet}; use rustc_data_structures::steal::Steal; use rustc_data_structures::svh::Svh; -use rustc_data_structures::sync::AtomicU64;use rustc_data_structures::sync::WorkerLocal; -use rustc_data_structures::sync::{self, Lrc}; +use rustc_data_structures::sync::AtomicU64; +use rustc_data_structures::sync::Lrc; +use rustc_data_structures::sync::WorkerLocal; use rustc_data_structures::unord::UnordSet; use rustc_errors::ErrorGuaranteed; use rustc_hir as hir;