diff options
| author | flip1995 <hello@philkrones.com> | 2020-04-24 00:22:34 +0200 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2020-04-24 00:22:34 +0200 |
| commit | 602f206408bea967f0f3934d14b918a43a11845d (patch) | |
| tree | 274e21a47a2ee82dca8602c71fc10fcdb81a9bec | |
| parent | 413a12909f3b149af17d75268ed4a136afb82c36 (diff) | |
| download | rust-602f206408bea967f0f3934d14b918a43a11845d.tar.gz rust-602f206408bea967f0f3934d14b918a43a11845d.zip | |
Use correct span on while (let) lowering
| -rw-r--r-- | src/librustc_ast_lowering/expr.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs index 0eed47050aa..cbe192d35e5 100644 --- a/src/librustc_ast_lowering/expr.rs +++ b/src/librustc_ast_lowering/expr.rs @@ -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) |
