Skip to content

Commit d588bc2

Browse files
Don't super fold const in Resolver
1 parent 575f129 commit d588bc2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_hir_typeck/src/writeback.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,7 @@ impl<'cx, 'tcx> TypeFolder<TyCtxt<'tcx>> for Resolver<'cx, 'tcx> {
864864
}
865865

866866
fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {
867-
self.handle_term(ct, ty::Const::outer_exclusive_binder, |tcx, guar| {
868-
ty::Const::new_error(tcx, guar)
869-
})
870-
.super_fold_with(self)
867+
self.handle_term(ct, ty::Const::outer_exclusive_binder, ty::Const::new_error)
871868
}
872869

873870
fn fold_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {

0 commit comments

Comments
 (0)