diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-22 21:01:11 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-23 18:18:47 +0000 |
| commit | d588bc2a2b49cb9f18fe051774a3f4a41ab5068e (patch) | |
| tree | 5678c1bd397c43448d5d6c8b27a3c85863648ac0 | |
| parent | 575f129faa5126869f11ef945276072b097a2b2a (diff) | |
| download | rust-d588bc2a2b49cb9f18fe051774a3f4a41ab5068e.tar.gz rust-d588bc2a2b49cb9f18fe051774a3f4a41ab5068e.zip | |
Don't super fold const in Resolver
| -rw-r--r-- | compiler/rustc_hir_typeck/src/writeback.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_hir_typeck/src/writeback.rs b/compiler/rustc_hir_typeck/src/writeback.rs index 6a3417ae5d6..748cb11290d 100644 --- a/compiler/rustc_hir_typeck/src/writeback.rs +++ b/compiler/rustc_hir_typeck/src/writeback.rs @@ -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> { - self.handle_term(ct, ty::Const::outer_exclusive_binder, |tcx, guar| { - ty::Const::new_error(tcx, guar) - }) - .super_fold_with(self) + self.handle_term(ct, ty::Const::outer_exclusive_binder, ty::Const::new_error) } fn fold_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> { |
