]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_query_impl/src/keys.rs
Rollup merge of #99396 - compiler-errors:missing-tests, r=Mark-Simulacrum
[rust.git] / compiler / rustc_query_impl / src / keys.rs
index c3fbba4456e1e4efe1cd1ac91f874b7fce597f49..54774314313746b2c64bcb16e35913c65fad2c71 100644 (file)
@@ -6,7 +6,7 @@
 use rustc_middle::traits;
 use rustc_middle::ty::fast_reject::SimplifiedType;
 use rustc_middle::ty::subst::{GenericArg, SubstsRef};
-use rustc_middle::ty::{self, Ty, TyCtxt};
+use rustc_middle::ty::{self, layout::TyAndLayout, Ty, TyCtxt};
 use rustc_span::symbol::{Ident, Symbol};
 use rustc_span::{Span, DUMMY_SP};
 
@@ -39,17 +39,6 @@ fn default_span(&self, _: TyCtxt<'_>) -> Span {
     }
 }
 
-impl Key for ty::RawLocalDefId {
-    #[inline(always)]
-    fn query_crate_is_local(&self) -> bool {
-        true
-    }
-
-    fn default_span(&self, _: TyCtxt<'_>) -> Span {
-        DUMMY_SP
-    }
-}
-
 impl<'tcx> Key for ty::InstanceDef<'tcx> {
     #[inline(always)]
     fn query_crate_is_local(&self) -> bool {
@@ -396,6 +385,16 @@ fn default_span(&self, _: TyCtxt<'_>) -> Span {
     }
 }
 
+impl<'tcx> Key for TyAndLayout<'tcx> {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+    fn default_span(&self, _: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}
+
 impl<'tcx> Key for (Ty<'tcx>, Ty<'tcx>) {
     #[inline(always)]
     fn query_crate_is_local(&self) -> bool {