1
Fork 0

No more TyCtxt::lazy_normalization

This commit is contained in:
Michael Goulet 2023-06-01 19:56:46 +00:00
parent 794249d768
commit 4fbb43e70f
6 changed files with 8 additions and 14 deletions

View file

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