mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Don't record child scopes for patterns.
They are unused.
This commit is contained in:
@@ -221,8 +221,6 @@ fn has_let_expr(expr: &Expr<'_>) -> bool {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user