Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/body/scope.rs')
-rw-r--r--crates/hir-def/src/body/scope.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/hir-def/src/body/scope.rs b/crates/hir-def/src/body/scope.rs
index 8ddb89a472..8fe20da747 100644
--- a/crates/hir-def/src/body/scope.rs
+++ b/crates/hir-def/src/body/scope.rs
@@ -115,15 +115,10 @@ impl ExprScopes {
fn new_block_scope(
&mut self,
parent: ScopeId,
- block: BlockId,
+ block: Option<BlockId>,
label: Option<(LabelId, Name)>,
) -> ScopeId {
- self.scopes.alloc(ScopeData {
- parent: Some(parent),
- block: Some(block),
- label,
- entries: vec![],
- })
+ self.scopes.alloc(ScopeData { parent: Some(parent), block, label, entries: vec![] })
}
fn add_bindings(&mut self, body: &Body, scope: ScopeId, binding: BindingId) {