about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2019-04-18 12:55:23 -0700
committerTaylor Cramer <cramertj@google.com>2019-05-07 14:45:53 -0700
commitfe8760cb848d45f5c83b41e689878b893b74e45d (patch)
tree8042688119098da68322461411aa8c44cfdcb3d4 /src/libsyntax/parse/token.rs
parentc3b8ab5199af4a3c11d14b0cbdb17a641e8eee71 (diff)
downloadrust-fe8760cb848d45f5c83b41e689878b893b74e45d.tar.gz
rust-fe8760cb848d45f5c83b41e689878b893b74e45d.zip
Implement built-in await syntax
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for `await` as a non-keyword under the `async_await`
feature.
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 2fa4f5263fb..fd7a39c576d 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -99,6 +99,11 @@ pub(crate) fn ident_can_begin_expr(ident: ast::Ident, is_raw: bool) -> bool {
     ident_token.is_path_segment_keyword() ||
     [
         keywords::Async.name(),
+
+        // FIXME: remove when `await!(..)` syntax is removed
+        // https://github.com/rust-lang/rust/issues/60610
+        keywords::Await.name(),
+
         keywords::Do.name(),
         keywords::Box.name(),
         keywords::Break.name(),