stop evaluating constants in Relate

This commit is contained in:
lcnr 2022-07-04 18:25:37 +02:00
parent 060f3e0c65
commit 01adb7e98d
7 changed files with 11 additions and 56 deletions

View file

@ -635,7 +635,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
#[instrument(skip(self), level = "debug")]
fn fold_const(&mut self, constant: ty::Const<'tcx>) -> ty::Const<'tcx> {
if self.selcx.tcx().lazy_normalization() || !self.eager_inference_replacement {
if self.selcx.tcx().lazy_normalization() {
constant
} else {
let constant = constant.super_fold_with(self);