1
Fork 0

make the eval() functions on our const types return the resulting value

This commit is contained in:
Ralf Jung 2023-09-12 23:28:25 +02:00
parent e5fedceabf
commit 6e4779ab17
16 changed files with 167 additions and 245 deletions

View file

@ -2054,7 +2054,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
tcx: self.tcx,
ty_op: |ty| ty,
lt_op: |lt| lt,
ct_op: |ct| ct.eval(self.tcx, ty::ParamEnv::empty()),
ct_op: |ct| ct.normalize(self.tcx, ty::ParamEnv::empty()),
});
cand
})

View file

@ -288,7 +288,7 @@ pub fn normalize_param_env_or_error<'tcx>(
// should actually be okay since without `feature(generic_const_exprs)` the only
// const arguments that have a non-empty param env are array repeat counts. These
// do not appear in the type system though.
c.eval(self.0, ty::ParamEnv::empty())
c.normalize(self.0, ty::ParamEnv::empty())
}
}

View file

@ -761,7 +761,7 @@ impl<'a, 'b, 'tcx> TypeFolder<TyCtxt<'tcx>> for AssocTypeNormalizer<'a, 'b, 'tcx
self.selcx.infcx,
&mut self.universes,
constant,
|constant| constant.eval(tcx, self.param_env),
|constant| constant.normalize(tcx, self.param_env),
)
}
}

View file

@ -358,7 +358,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'cx, 'tcx>
self.infcx,
&mut self.universes,
constant,
|constant| constant.eval(self.infcx.tcx, self.param_env),
|constant| constant.normalize(self.infcx.tcx, self.param_env),
))
}