mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
minor: remove duplicate calls
This commit is contained in:
parent
add6cccd4c
commit
1f1682ee1e
@ -151,18 +151,15 @@ fn compute_block_scopes(
|
||||
match stmt {
|
||||
Statement::Let { pat, initializer, else_branch, .. } => {
|
||||
if let Some(expr) = initializer {
|
||||
scopes.set_scope(*expr, scope);
|
||||
compute_expr_scopes(*expr, body, scopes, scope);
|
||||
}
|
||||
if let Some(expr) = else_branch {
|
||||
scopes.set_scope(*expr, scope);
|
||||
compute_expr_scopes(*expr, body, scopes, scope);
|
||||
}
|
||||
scope = scopes.new_scope(scope);
|
||||
scopes.add_bindings(body, scope, *pat);
|
||||
}
|
||||
Statement::Expr { expr, .. } => {
|
||||
scopes.set_scope(*expr, scope);
|
||||
compute_expr_scopes(*expr, body, scopes, scope);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user