Replace mk_const with Const::new_x methods

This commit is contained in:
Boxy 2023-07-04 14:26:19 +01:00
parent cd68ead9ec
commit ddbc774e74
32 changed files with 219 additions and 134 deletions

View file

@ -96,7 +96,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
let recursion_limit = tcx.recursion_limit();
if !recursion_limit.value_within_limit(self.depth) {
self.at.infcx.err_ctxt().report_overflow_error(
&tcx.mk_const(uv, ty),
&ty::Const::new_unevaluated(tcx, uv, ty),
self.at.cause.span,
true,
|_| {},
@ -131,7 +131,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
let ct = infcx.resolve_vars_if_possible(new_infer_ct);
ct.try_fold_with(self)?
} else {
tcx.mk_const(uv, ty).try_super_fold_with(self)?
ty::Const::new_unevaluated(tcx, uv, ty).try_super_fold_with(self)?
};
self.depth -= 1;