diff options
| author | Michael Goulet <michael@errs.io> | 2023-04-25 18:59:16 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-04-27 17:18:11 +0000 |
| commit | f0fc4f9acf19c2d35406688ff39106e90edfa979 (patch) | |
| tree | 2985b293b46fba1c0ce9befa1e59cf7f43bf1f5c /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 12a2f24b156973316dd0853dc0263bf8efff1ac4 (diff) | |
| download | rust-f0fc4f9acf19c2d35406688ff39106e90edfa979.tar.gz rust-f0fc4f9acf19c2d35406688ff39106e90edfa979.zip | |
Tweak await span
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 03c82fbd329..2dd0232d6eb 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -859,7 +859,7 @@ impl<'a> Parser<'a> { ExprKind::Field(_, _) => "a field access", ExprKind::MethodCall(_) => "a method call", ExprKind::Call(_, _) => "a function call", - ExprKind::Await(_) => "`.await`", + ExprKind::Await(_, _) => "`.await`", ExprKind::Err => return Ok(with_postfix), _ => unreachable!("parse_dot_or_call_expr_with_ shouldn't produce this"), } @@ -3256,7 +3256,7 @@ impl<'a> Parser<'a> { fn mk_await_expr(&mut self, self_arg: P<Expr>, lo: Span) -> P<Expr> { let span = lo.to(self.prev_token.span); - let await_expr = self.mk_expr(span, ExprKind::Await(self_arg)); + let await_expr = self.mk_expr(span, ExprKind::Await(self_arg, self.prev_token.span)); self.recover_from_await_method_call(); await_expr } |
