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

@ -1,5 +1,6 @@
use super::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
use super::{FixupError, FixupResult, InferCtxt, Span};
use rustc_middle::mir;
use rustc_middle::ty::fold::{TypeFolder, TypeVisitor};
use rustc_middle::ty::{self, Const, InferConst, Ty, TyCtxt, TypeFoldable};
@ -46,6 +47,10 @@ impl<'a, 'tcx> TypeFolder<'tcx> for OpportunisticVarResolver<'a, 'tcx> {
ct.super_fold_with(self)
}
}
fn fold_mir_const(&mut self, constant: mir::ConstantKind<'tcx>) -> mir::ConstantKind<'tcx> {
constant.super_fold_with(self)
}
}
/// The opportunistic region resolver opportunistically resolves regions