Skip to content

Commit 935a091

Browse files
committed
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 #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`
2 parents 91db3bd + 8dc92a3 commit 935a091

File tree

1 file changed

+0
-33
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+0
-33
lines changed

compiler/rustc_middle/src/query/keys.rs

-33
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use rustc_hir::hir_id::{HirId, OwnerId};
1212
use rustc_query_system::query::{DefaultCacheSelector, SingleCacheSelector, VecCacheSelector};
1313
use rustc_span::symbol::{Ident, Symbol};
1414
use rustc_span::{Span, DUMMY_SP};
15-
use rustc_target::abi::FieldIdx;
1615

1716
/// Placeholder for `CrateNum`'s "local" counterpart
1817
#[derive(Copy, Clone, Debug)]
@@ -360,30 +359,6 @@ impl<'tcx> Key for (ty::ParamEnv<'tcx>, ty::TraitRef<'tcx>) {
360359
}
361360
}
362361

363-
impl<'tcx> Key for (ty::Const<'tcx>, FieldIdx) {
364-
type CacheSelector = DefaultCacheSelector<Self>;
365-
366-
fn default_span(&self, _: TyCtxt<'_>) -> Span {
367-
DUMMY_SP
368-
}
369-
}
370-
371-
impl<'tcx> Key for (mir::ConstValue<'tcx>, Ty<'tcx>) {
372-
type CacheSelector = DefaultCacheSelector<Self>;
373-
374-
fn default_span(&self, _: TyCtxt<'_>) -> Span {
375-
DUMMY_SP
376-
}
377-
}
378-
379-
impl<'tcx> Key for mir::ConstAlloc<'tcx> {
380-
type CacheSelector = DefaultCacheSelector<Self>;
381-
382-
fn default_span(&self, _: TyCtxt<'_>) -> Span {
383-
DUMMY_SP
384-
}
385-
}
386-
387362
impl<'tcx> Key for ty::PolyTraitRef<'tcx> {
388363
type CacheSelector = DefaultCacheSelector<Self>;
389364

@@ -416,14 +391,6 @@ impl<'tcx> Key for GenericArg<'tcx> {
416391
}
417392
}
418393

419-
impl<'tcx> Key for mir::Const<'tcx> {
420-
type CacheSelector = DefaultCacheSelector<Self>;
421-
422-
fn default_span(&self, _: TyCtxt<'_>) -> Span {
423-
DUMMY_SP
424-
}
425-
}
426-
427394
impl<'tcx> Key for ty::Const<'tcx> {
428395
type CacheSelector = DefaultCacheSelector<Self>;
429396

0 commit comments

Comments
 (0)