From dbacfbc3681622d634233bcf36504ec898f91818 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 30 Mar 2021 14:26:40 +0000 Subject: Add a new normalization query just for mir constants --- compiler/rustc_query_impl/src/keys.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/rustc_query_impl/src') diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index e467f419863..1fdb37398f9 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -255,6 +255,15 @@ impl<'tcx> Key for GenericArg<'tcx> { } } +impl<'tcx> Key for mir::ConstantKind<'tcx> { + fn query_crate(&self) -> CrateNum { + LOCAL_CRATE + } + fn default_span(&self, _: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} + impl<'tcx> Key for &'tcx ty::Const<'tcx> { fn query_crate(&self) -> CrateNum { LOCAL_CRATE -- cgit 1.4.1-3-g733a5