Skip to content

Commit 27a2881

Browse files
committed
Fix span for await macro call
1 parent b9d6fe3 commit 27a2881

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,7 @@ impl<'a> Parser<'a> {
27152715
err
27162716
})?;
27172717
self.expect(&token::CloseDelim(token::Paren))?;
2718-
Ok((expr.span, ExprKind::Await(ast::AwaitOrigin::MacroLike, expr)))
2718+
Ok((self.prev_span, ExprKind::Await(ast::AwaitOrigin::MacroLike, expr)))
27192719
} else { // Handle `await <expr>`.
27202720
self.parse_incorrect_await_syntax(lo, await_sp)
27212721
}

src/test/ui/feature-gate/await-macro.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0658]: `await!(<expr>)` macro syntax is unstable, and will soon be remove
22
--> $DIR/await-macro.rs:9:5
33
|
44
LL | await!(bar());
5-
| ^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^
66
|
77
= note: for more information, see https://github.com/rust-lang/rust/issues/50547
88
= help: add #![feature(await_macro)] to the crate attributes to enable

0 commit comments

Comments
 (0)