about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-30 07:10:18 +0000
committerbors <bors@rust-lang.org>2018-06-30 07:10:18 +0000
commitacf50b79beb5909c16861cc7c91e8226b7f78272 (patch)
tree19e6e9829d02f450633734a93c3678b6d1720e2c /src/libsyntax/parse
parent87ecf5442ced38a6253e670dd6d87c0c334b21fb (diff)
parent99575b5cac73a71685a783262249d803001a06a8 (diff)
downloadrust-acf50b79beb5909c16861cc7c91e8226b7f78272.tar.gz
rust-acf50b79beb5909c16861cc7c91e8226b7f78272.zip
Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertj
Lowering cleanups [1/N]
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index faf2cf64e1d..e04fec797e0 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1299,7 +1299,10 @@ impl<'a> Parser<'a> {
     /// Parse asyncness: `async` or nothing
     fn parse_asyncness(&mut self) -> IsAsync {
         if self.eat_keyword(keywords::Async) {
-            IsAsync::Async(ast::DUMMY_NODE_ID)
+            IsAsync::Async {
+                closure_id: ast::DUMMY_NODE_ID,
+                return_impl_trait_id: ast::DUMMY_NODE_ID,
+            }
         } else {
             IsAsync::NotAsync
         }
@@ -1537,7 +1540,7 @@ impl<'a> Parser<'a> {
             // Always parse bounds greedily for better error recovery.
             let bounds = self.parse_generic_bounds()?;
             impl_dyn_multi = bounds.len() > 1 || self.prev_token_kind == PrevTokenKind::Plus;
-            TyKind::ImplTrait(bounds)
+            TyKind::ImplTrait(ast::DUMMY_NODE_ID, bounds)
         } else if self.check_keyword(keywords::Dyn) &&
                   self.look_ahead(1, |t| t.can_begin_bound() &&
                                          !can_continue_type_after_non_fn_ident(t)) {
@@ -3279,10 +3282,8 @@ impl<'a> Parser<'a> {
         } else {
             Movability::Movable
         };
-        let asyncness = if self.span.edition() >= Edition::Edition2018
-            && self.eat_keyword(keywords::Async)
-        {
-            IsAsync::Async(ast::DUMMY_NODE_ID)
+        let asyncness = if self.span.edition() >= Edition::Edition2018 {
+            self.parse_asyncness()
         } else {
             IsAsync::NotAsync
         };
@@ -6798,7 +6799,10 @@ impl<'a> Parser<'a> {
             let fn_span = self.prev_span;
             let (ident, item_, extra_attrs) =
                 self.parse_item_fn(unsafety,
-                                   IsAsync::Async(ast::DUMMY_NODE_ID),
+                                   IsAsync::Async {
+                                       closure_id: ast::DUMMY_NODE_ID,
+                                       return_impl_trait_id: ast::DUMMY_NODE_ID,
+                                   },
                                    respan(fn_span, Constness::NotConst),
                                    Abi::Rust)?;
             let prev_span = self.prev_span;