Skip to content

Commit

Permalink
Fix span for await macro call
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 16, 2019
1 parent b9d6fe3 commit 27a2881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -2715,7 +2715,7 @@ impl<'a> Parser<'a> {
err
})?;
self.expect(&token::CloseDelim(token::Paren))?;
Ok((expr.span, ExprKind::Await(ast::AwaitOrigin::MacroLike, expr)))
Ok((self.prev_span, ExprKind::Await(ast::AwaitOrigin::MacroLike, expr)))
} else { // Handle `await <expr>`.
self.parse_incorrect_await_syntax(lo, await_sp)
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/feature-gate/await-macro.stderr
Expand Up @@ -2,7 +2,7 @@ error[E0658]: `await!(<expr>)` macro syntax is unstable, and will soon be remove
--> $DIR/await-macro.rs:9:5
|
LL | await!(bar());
| ^^^^^^^^^^^^
| ^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/50547
= help: add #![feature(await_macro)] to the crate attributes to enable
Expand Down

0 comments on commit 27a2881

Please sign in to comment.