1
Fork 0

Add a new normalization query just for mir constants

This commit is contained in:
Oli Scherer 2021-03-30 14:26:40 +00:00
parent c7c39ce6d0
commit dbacfbc368
19 changed files with 128 additions and 34 deletions

View file

@ -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