Skip to content

Commit 602f206

Browse files
committed
Use correct span on while (let) lowering
1 parent 413a129 commit 602f206

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/librustc_ast_lowering/expr.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
397397
let then_arm = self.arm(then_pat, self.arena.alloc(then_expr));
398398

399399
// `match <scrutinee> { ... }`
400-
let match_expr = self.expr_match(
401-
scrutinee.span,
402-
scrutinee,
403-
arena_vec![self; then_arm, else_arm],
404-
desugar,
405-
);
400+
let match_expr =
401+
self.expr_match(span, scrutinee, arena_vec![self; then_arm, else_arm], desugar);
406402

407403
// `[opt_ident]: loop { ... }`
408404
hir::ExprKind::Loop(self.block_expr(self.arena.alloc(match_expr)), opt_label, source)

0 commit comments

Comments
 (0)