Skip to content

Commit 1da5e60

Browse files
committed
Don't record child scopes for patterns.
They are unused.
1 parent 6e8abb5 commit 1da5e60

File tree

1 file changed

+0
-2
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+0
-2
lines changed

Diff for: compiler/rustc_hir_analysis/src/check/region.rs

-2
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ fn resolve_arm<'tcx>(visitor: &mut ScopeResolutionVisitor<'tcx>, arm: &'tcx hir:
221221
}
222222

223223
fn resolve_pat<'tcx>(visitor: &mut ScopeResolutionVisitor<'tcx>, pat: &'tcx hir::Pat<'tcx>) {
224-
visitor.record_child_scope(Scope { local_id: pat.hir_id.local_id, data: ScopeData::Node });
225-
226224
// If this is a binding then record the lifetime of that binding.
227225
if let PatKind::Binding(..) = pat.kind {
228226
record_var_lifetime(visitor, pat.hir_id.local_id);

0 commit comments

Comments
 (0)