]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/query/keys.rs
Revert previous attempt at detecting unsatisfiable predicates
[rust.git] / src / librustc / ty / query / keys.rs
index 20f8e7f564abd6b407a4915dcf7416cfad6052fb..cbf335ad607ef3e9f1ae84ed3825cde3a0f32df9 100644 (file)
@@ -52,6 +52,16 @@ fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
     }
 }
 
+impl<'tcx> Key for mir::interpret::LitToConstInput<'tcx> {
+    fn query_crate(&self) -> CrateNum {
+        LOCAL_CRATE
+    }
+
+    fn default_span(&self, _tcx: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}
+
 impl Key for CrateNum {
     fn query_crate(&self) -> CrateNum {
         *self
@@ -115,15 +125,6 @@ fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
     }
 }
 
-impl<'tcx> Key for (DefId, SubstsRef<'tcx>, traits::TraitQueryMode) {
-    fn query_crate(&self) -> CrateNum {
-        self.0.krate
-    }
-    fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
-        self.0.default_span(tcx)
-    }
-}
-
 impl<'tcx> Key for (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>) {
     fn query_crate(&self) -> CrateNum {
         self.1.def_id().krate