Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6695391

Browse files
committed
Auto merge of rust-lang#140776 - compiler-errors:nested-opt, r=<try>
don't walk into patterns or types in NestedBodiesVisitor r? `@ghost`
2 parents e9f8103 + 86039e8 commit 6695391

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_ty_utils/src/nested_bodies.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ impl<'tcx> Visitor<'tcx> for NestedBodiesVisitor<'tcx> {
2727
self.visit_body(body);
2828
}
2929
}
30+
31+
fn visit_pat(&mut self, _: &'tcx hir::Pat<'tcx>) {}
32+
33+
fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, hir::AmbigArg>) {}
3034
}
3135

3236
pub(super) fn provide(providers: &mut Providers) {

0 commit comments

Comments
 (0)