Skip to content

Commit 86039e8

Browse files
don't walk into pat or ty in NestedBodiesVisitor
1 parent e9f8103 commit 86039e8

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)