From 15a6c09b6e8a977f2c6f5a73de01a20d00b37930 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 22 Sep 2019 00:19:02 +0200 Subject: pre-expansion gate type_ascription --- src/libsyntax/parse/parser/expr.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/parse/parser') diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index e7dd15654d8..97b1092452a 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -252,6 +252,7 @@ impl<'a> Parser<'a> { self.last_type_ascription = Some((self.prev_span, maybe_path)); lhs = self.parse_assoc_op_cast(lhs, lhs_span, ExprKind::Type)?; + self.sess.gated_spans.type_ascription.borrow_mut().push(lhs.span); continue } else if op == AssocOp::DotDot || op == AssocOp::DotDotEq { // If we didn’t have to handle `x..`/`x..=`, it would be pretty easy to -- cgit 1.4.1-3-g733a5