1
Fork 0

Don't super fold const in Resolver

This commit is contained in:
Michael Goulet 2025-03-22 21:01:11 +00:00
parent 575f129faa
commit d588bc2a2b

View file

@ -864,10 +864,7 @@ impl<'cx, 'tcx> TypeFolder<TyCtxt<'tcx>> for Resolver<'cx, 'tcx> {
} }
fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
self.handle_term(ct, ty::Const::outer_exclusive_binder, |tcx, guar| { self.handle_term(ct, ty::Const::outer_exclusive_binder, ty::Const::new_error)
ty::Const::new_error(tcx, guar)
})
.super_fold_with(self)
} }
fn fold_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> { fn fold_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {