diff options
Diffstat (limited to 'compiler/rustc_query_impl/src/keys.rs')
| -rw-r--r-- | compiler/rustc_query_impl/src/keys.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index b3cc7de4662..1993e0a602f 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -1,6 +1,7 @@ //! Defines the set of legal keys that can be used in queries. use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE}; +use rustc_hir::HirId; use rustc_middle::infer::canonical::Canonical; use rustc_middle::mir; use rustc_middle::ty::fast_reject::SimplifiedType; @@ -395,3 +396,14 @@ impl<'tcx> Key for (DefId, Ty<'tcx>, SubstsRef<'tcx>, ty::ParamEnv<'tcx>) { DUMMY_SP } } + +impl<'tcx> Key for (ty::Predicate<'tcx>, HirId) { + #[inline(always)] + fn query_crate_is_local(&self) -> bool { + true + } + + fn default_span(&self, _tcx: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} |
