From ea921aca5d6268474383b6bac8fdd78de1f23c5a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 15 Sep 2021 13:12:07 +0200 Subject: Blocks directly in template also scope --- src/syntax/expr.rs | 2 -- src/syntax/visit.rs | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs index 11a85404..68b96f9c 100644 --- a/src/syntax/expr.rs +++ b/src/syntax/expr.rs @@ -190,8 +190,6 @@ pub struct BlockExpr { pub span: Span, /// The list of expressions contained in the block. pub exprs: Vec, - /// Whether the block should create a scope. - pub scoping: bool, } /// A unary operation: `-x`. diff --git a/src/syntax/visit.rs b/src/syntax/visit.rs index d689209b..40e8eb93 100644 --- a/src/syntax/visit.rs +++ b/src/syntax/visit.rs @@ -158,15 +158,11 @@ impl_visitors! { } visit_block(v, block: BlockExpr) { - if block.scoping { - v.visit_enter(); - } + v.visit_enter(); for expr in r!(block.exprs) { v.visit_expr(expr); } - if block.scoping { - v.visit_exit(); - } + v.visit_exit(); } visit_binary(v, binary: BinaryExpr) { -- cgit v1.2.3