diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-30 14:26:40 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-31 10:40:42 +0000 |
| commit | dbacfbc3681622d634233bcf36504ec898f91818 (patch) | |
| tree | 5320c2401ab3f6f60766e029add981d33cb221a0 /compiler/rustc_query_impl/src | |
| parent | c7c39ce6d07e4d33dc25e07c43f0139c0634b7eb (diff) | |
| download | rust-dbacfbc3681622d634233bcf36504ec898f91818.tar.gz rust-dbacfbc3681622d634233bcf36504ec898f91818.zip | |
Add a new normalization query just for mir constants
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/keys.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
