]> git.lizzy.rs Git - rust.git/commitdiff
Fix span for await macro call
authorEsteban Küber <esteban@kuber.com.ar>
Thu, 16 May 2019 21:30:39 +0000 (14:30 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Thu, 16 May 2019 21:30:39 +0000 (14:30 -0700)
src/libsyntax/parse/parser.rs
src/test/ui/feature-gate/await-macro.stderr

index bb0f9fa9502a0ccacb890b173c95e5d4023e5b98..c34c7f3f1bb09035bda875aef9e677f8b2b60452 100644 (file)
@@ -2715,7 +2715,7 @@ fn parse_await_macro_or_alt(
                 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)
         }
index 57aab6800f7ab21bb22857f4c2102af09528c2b9..699a7a8886e890eae72b10d8c584c1c1ffac0239 100644 (file)
@@ -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