Fix issues caused during rebase
@@ -318,7 +318,9 @@ impl ExprCollector<'_> {
ast::Expr::BlockExpr(e) => self.collect_block(e),
ast::Expr::LoopExpr(e) => {
let body = self.collect_block_opt(e.loop_body());
- track_parent!(self, self.alloc_expr(Expr::Loop { body }, syntax_ptr), vec![body])
+ track_parent!(
+ self,
+ self.alloc_expr(
Expr::Loop {
body,
label: e
@@ -327,7 +329,9 @@ impl ExprCollector<'_> {
.map(|l| Name::new_lifetime(&l)),
},
syntax_ptr,
- ), body)
+ ),
+ body
+ )
}
ast::Expr::WhileExpr(e) => {
let body = self.collect_block_opt(e.loop_body());
@@ -350,7 +354,9 @@ impl ExprCollector<'_> {
];
let match_expr =
self.alloc_expr_desugared(Expr::Match { expr: match_expr, arms });
- return track_parent!(self, self.alloc_expr(
+ return track_parent!(
+ self,
+ self.alloc_expr(
Expr::Loop {
body: match_expr,
label: e
@@ -359,12 +365,16 @@ impl ExprCollector<'_> {
.map(|l| Name::new_lifetime(&l)),
},
syntax_ptr,
- ), match_expr);
+ ),
+ match_expr
+ );
}
},
};
- track_parent!(self, self.alloc_expr(
+ track_parent!(
+ self,
+ self.alloc_expr(
Expr::While {
condition,
body,
@@ -374,13 +384,18 @@ impl ExprCollector<'_> {
.map(|l| Name::new_lifetime(&l)),
},
syntax_ptr,
- ), body, condition)
+ ),
+ body,
+ condition
+ )
}
ast::Expr::ForExpr(e) => {
let iterable = self.collect_expr_opt(e.iterable());
let pat = self.collect_pat_opt(e.pat());
let body = self.collect_block_opt(e.loop_body());
- track_parent!(self, self.alloc_expr(
+ track_parent!(
+ self,
+ self.alloc_expr(
Expr::For {
iterable,
pat,
@@ -391,7 +406,10 @@ impl ExprCollector<'_> {
.map(|l| Name::new_lifetime(&l)),
},
syntax_ptr,
- ), iterable, body)
+ ),
+ iterable,
+ body
+ )
}
ast::Expr::CallExpr(e) => {
let callee = self.collect_expr_opt(e.expr());
@@ -461,10 +479,10 @@ impl ExprCollector<'_> {
.unwrap_or(Expr::Missing);
self.alloc_expr(path, syntax_ptr)
}
- ast::Expr::ContinueExpr(e) => (self.alloc_expr(
+ ast::Expr::ContinueExpr(e) => self.alloc_expr(
Expr::Continue { label: e.lifetime_token().map(|l| Name::new_lifetime(&l)) },
syntax_ptr,
- ), vec![]),
+ ),
ast::Expr::BreakExpr(e) => {
let expr = e.expr().map(|e| self.collect_expr(e));
track_parent!(self, self.alloc_expr(
