Use correct span on while (let) lowering
This commit is contained in:
parent
413a12909f
commit
602f206408
1 changed files with 2 additions and 6 deletions
|
|
@ -397,12 +397,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
let then_arm = self.arm(then_pat, self.arena.alloc(then_expr));
|
||||
|
||||
// `match <scrutinee> { ... }`
|
||||
let match_expr = self.expr_match(
|
||||
scrutinee.span,
|
||||
scrutinee,
|
||||
arena_vec![self; then_arm, else_arm],
|
||||
desugar,
|
||||
);
|
||||
let match_expr =
|
||||
self.expr_match(span, scrutinee, arena_vec![self; then_arm, else_arm], desugar);
|
||||
|
||||
// `[opt_ident]: loop { ... }`
|
||||
hir::ExprKind::Loop(self.block_expr(self.arena.alloc(match_expr)), opt_label, source)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue