diff options
| author | bors <bors@rust-lang.org> | 2023-10-07 15:21:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-07 15:21:05 +0000 |
| commit | 935a091a7834253a845a92629b8f1109b5befa5d (patch) | |
| tree | 4a4ec88e30ae9d1ae6e603f01e0284cdedd78ad3 | |
| parent | 91db3bdc8cefa5a9bd58b8fbc3ce5ef1859b4b93 (diff) | |
| parent | 8dc92a360c3f8df35ea9d7df566159b79c8c737f (diff) | |
| download | rust-935a091a7834253a845a92629b8f1109b5befa5d.tar.gz rust-935a091a7834253a845a92629b8f1109b5befa5d.zip | |
Auto merge of #116330 - RalfJung:dont-key-on-allocid, r=oli-obk
remove Key impls for types that involve an AllocId I don't understand how but somehow that leads to issues like https://github.com/rust-lang/rust/issues/83085? Anyway removing unused impls doesn't seem like a bad idea. The concerning part is that of course nothing will stop us from having such impls again in the future, alongside re-introducing bugs like #83085. r? `@oli-obk`
| -rw-r--r-- | compiler/rustc_middle/src/query/keys.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/compiler/rustc_middle/src/query/keys.rs b/compiler/rustc_middle/src/query/keys.rs index b1f83796862..11376345052 100644 --- a/compiler/rustc_middle/src/query/keys.rs +++ b/compiler/rustc_middle/src/query/keys.rs @@ -12,7 +12,6 @@ use rustc_hir::hir_id::{HirId, OwnerId}; use rustc_query_system::query::{DefaultCacheSelector, SingleCacheSelector, VecCacheSelector}; use rustc_span::symbol::{Ident, Symbol}; use rustc_span::{Span, DUMMY_SP}; -use rustc_target::abi::FieldIdx; /// Placeholder for `CrateNum`'s "local" counterpart #[derive(Copy, Clone, Debug)] @@ -360,30 +359,6 @@ impl<'tcx> Key for (ty::ParamEnv<'tcx>, ty::TraitRef<'tcx>) { } } -impl<'tcx> Key for (ty::Const<'tcx>, FieldIdx) { - type CacheSelector = DefaultCacheSelector<Self>; - - fn default_span(&self, _: TyCtxt<'_>) -> Span { - DUMMY_SP - } -} - -impl<'tcx> Key for (mir::ConstValue<'tcx>, Ty<'tcx>) { - type CacheSelector = DefaultCacheSelector<Self>; - - fn default_span(&self, _: TyCtxt<'_>) -> Span { - DUMMY_SP - } -} - -impl<'tcx> Key for mir::ConstAlloc<'tcx> { - type CacheSelector = DefaultCacheSelector<Self>; - - fn default_span(&self, _: TyCtxt<'_>) -> Span { - DUMMY_SP - } -} - impl<'tcx> Key for ty::PolyTraitRef<'tcx> { type CacheSelector = DefaultCacheSelector<Self>; @@ -416,14 +391,6 @@ impl<'tcx> Key for GenericArg<'tcx> { } } -impl<'tcx> Key for mir::Const<'tcx> { - type CacheSelector = DefaultCacheSelector<Self>; - - fn default_span(&self, _: TyCtxt<'_>) -> Span { - DUMMY_SP - } -} - impl<'tcx> Key for ty::Const<'tcx> { type CacheSelector = DefaultCacheSelector<Self>; |
