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

@@ -730,7 +730,7 @@ impl<'tcx> TypeSuperFoldable<TyCtxt<'tcx>> for ty::Const<'tcx> {
let ty = self.ty().try_fold_with(folder)?;
let kind = self.kind().try_fold_with(folder)?;
if ty != self.ty() || kind != self.kind() {
Ok(folder.interner().mk_const(kind, ty))
Ok(folder.interner().mk_ct_from_kind(kind, ty))
} else {
Ok(self)
}