diff options
| author | Taylor Cramer <cramertj@google.com> | 2019-04-18 12:55:23 -0700 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2019-05-07 14:45:53 -0700 |
| commit | fe8760cb848d45f5c83b41e689878b893b74e45d (patch) | |
| tree | 8042688119098da68322461411aa8c44cfdcb3d4 /src/libsyntax/parse/token.rs | |
| parent | c3b8ab5199af4a3c11d14b0cbdb17a641e8eee71 (diff) | |
| download | rust-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.rs | 5 |
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(), |
