diff options
| author | bors <bors@rust-lang.org> | 2019-08-21 11:40:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-21 11:40:23 +0000 |
| commit | 7b0085a613e69cb69fc9e4eb5d422fa4a39d5de1 (patch) | |
| tree | 72512acc5978c56d76351fa7af4f9ff9103db06a /src/libsyntax/parse/parser | |
| parent | bea0372a1a7a31b81f28cc4d9a83a2dc9a79d008 (diff) | |
| parent | b25ec0438430f32b6278c9fa2ba0cfb697eb70b5 (diff) | |
| download | rust-7b0085a613e69cb69fc9e4eb5d422fa4a39d5de1.tar.gz rust-7b0085a613e69cb69fc9e4eb5d422fa4a39d5de1.zip | |
Auto merge of #63779 - Centril:rollup-sx96dli, r=Centril
Rollup of 7 pull requests Successful merges: - #63721 (Do not emit JSON dumps of diagnostic codes) - #63753 (Bump toml dependency.) - #63755 (Use dedicated type for spans in pre-expansion gating.) - #63759 (Allow 'default async fn' to parse.) - #63760 (Update books) - #63762 (`async_await` was stabilized in 1.39.0, not 1.38.0.) - #63766 (Remove some duplication when resolving constants) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax/parse/parser')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/item.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/pat.rs | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index ccc6bd15067..5da9b75d53b 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -999,7 +999,7 @@ impl<'a> Parser<'a> { } let span = lo.to(hi); - self.sess.yield_spans.borrow_mut().push(span); + self.sess.gated_spans.yields.borrow_mut().push(span); } else if self.eat_keyword(kw::Let) { return self.parse_let_expr(attrs); } else if is_span_rust_2018 && self.eat_keyword(kw::Await) { @@ -1111,7 +1111,7 @@ impl<'a> Parser<'a> { }; if asyncness.is_async() { // Feature gate `async ||` closures. - self.sess.async_closure_spans.borrow_mut().push(self.prev_span); + self.sess.gated_spans.async_closure.borrow_mut().push(self.prev_span); } let capture_clause = self.parse_capture_clause(); @@ -1234,7 +1234,7 @@ impl<'a> Parser<'a> { if let ExprKind::Let(..) = cond.node { // Remove the last feature gating of a `let` expression since it's stable. - let last = self.sess.let_chains_spans.borrow_mut().pop(); + let last = self.sess.gated_spans.let_chains.borrow_mut().pop(); debug_assert_eq!(cond.span, last.unwrap()); } @@ -1252,7 +1252,7 @@ impl<'a> Parser<'a> { |this| this.parse_assoc_expr_with(1 + prec_let_scrutinee_needs_par(), None.into()) )?; let span = lo.to(expr.span); - self.sess.let_chains_spans.borrow_mut().push(span); + self.sess.gated_spans.let_chains.borrow_mut().push(span); Ok(self.mk_expr(span, ExprKind::Let(pats, expr), attrs)) } diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index 72819c99660..03d7e922123 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -825,6 +825,7 @@ impl<'a> Parser<'a> { self.is_keyword_ahead(1, &[ kw::Impl, kw::Const, + kw::Async, kw::Fn, kw::Unsafe, kw::Extern, diff --git a/src/libsyntax/parse/parser/pat.rs b/src/libsyntax/parse/parser/pat.rs index fd458aec743..8cfa6abbe62 100644 --- a/src/libsyntax/parse/parser/pat.rs +++ b/src/libsyntax/parse/parser/pat.rs @@ -123,7 +123,7 @@ impl<'a> Parser<'a> { let or_pattern_span = lo.to(self.prev_span); - self.sess.or_pattern_spans.borrow_mut().push(or_pattern_span); + self.sess.gated_spans.or_patterns.borrow_mut().push(or_pattern_span); Ok(self.mk_pat(or_pattern_span, PatKind::Or(pats))) } |
