diff options
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/keys.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index 84de31a194d..f1f83a7299c 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -141,6 +141,16 @@ impl Key for ty::WithOptConstParam<LocalDefId> { } } +impl Key for SimplifiedType { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { + true + } + fn default_span(&self, _: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} + impl Key for (DefId, DefId) { #[inline(always)] fn query_crate_is_local(&self) -> bool { @@ -215,6 +225,16 @@ impl Key for (CrateNum, DefId) { } } +impl Key for (CrateNum, SimplifiedType) { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { + self.0 == LOCAL_CRATE + } + fn default_span(&self, _: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} + impl Key for (DefId, SimplifiedType) { #[inline(always)] fn query_crate_is_local(&self) -> bool { |
