Simplify shallow resolver to just fold ty/consts

This commit is contained in:
Michael Goulet
2024-04-06 02:05:17 -04:00
parent 3493a56529
commit ecef296a03
13 changed files with 96 additions and 125 deletions

View File

@@ -649,7 +649,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for PlaceholderReplacer<'_, 'tcx> {
}
fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
let ct = self.infcx.shallow_resolve(ct);
let ct = self.infcx.shallow_resolve_const(ct);
if let ty::ConstKind::Placeholder(p) = ct.kind() {
let replace_var = self.mapped_consts.get(&p);
match replace_var {