Don't record child scopes for patterns.
They are unused.
This commit is contained in:
parent
6e8abb5ec6
commit
1da5e60ac5
1 changed files with 0 additions and 2 deletions
|
@ -221,8 +221,6 @@ fn resolve_arm<'tcx>(visitor: &mut ScopeResolutionVisitor<'tcx>, arm: &'tcx hir:
|
|||
}
|
||||
|
||||
fn resolve_pat<'tcx>(visitor: &mut ScopeResolutionVisitor<'tcx>, pat: &'tcx hir::Pat<'tcx>) {
|
||||
visitor.record_child_scope(Scope { local_id: pat.hir_id.local_id, data: ScopeData::Node });
|
||||
|
||||
// If this is a binding then record the lifetime of that binding.
|
||||
if let PatKind::Binding(..) = pat.kind {
|
||||
record_var_lifetime(visitor, pat.hir_id.local_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue