]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_query_impl/src/keys.rs
Rollup merge of #102109 - petrochenkov:addids, r=oli-obk
[rust.git] / compiler / rustc_query_impl / src / keys.rs
index ea2d10cd14bf70537411b6038898411531f78dd1..2bb7a240faa60b88d101e3b9da6f4bc5ec46dfa1 100644 (file)
@@ -1,7 +1,6 @@
 //! Defines the set of legal keys that can be used in queries.
 
 use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
-use rustc_hir::hir_id::HirId;
 use rustc_middle::infer::canonical::Canonical;
 use rustc_middle::mir;
 use rustc_middle::traits;
@@ -276,7 +275,7 @@ fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
     }
 }
 
-impl<'tcx> Key for (ty::Unevaluated<'tcx, ()>, ty::Unevaluated<'tcx, ()>) {
+impl<'tcx> Key for (ty::UnevaluatedConst<'tcx>, ty::UnevaluatedConst<'tcx>) {
     #[inline(always)]
     fn query_crate_is_local(&self) -> bool {
         (self.0).def.did.krate == LOCAL_CRATE
@@ -544,19 +543,3 @@ fn default_span(&self, _: TyCtxt<'_>) -> Span {
         DUMMY_SP
     }
 }
-
-impl Key for HirId {
-    #[inline(always)]
-    fn query_crate_is_local(&self) -> bool {
-        true
-    }
-
-    fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
-        self.owner.default_span(tcx)
-    }
-
-    #[inline(always)]
-    fn key_as_def_id(&self) -> Option<DefId> {
-        Some(self.owner.to_def_id())
-    }
-}