pre-expansion gate try_blocks

This commit is contained in:
Mazdak Farrokhzad
2019-09-21 23:09:17 +02:00
parent 665a876e30
commit 1935ba658c
5 changed files with 13 additions and 8 deletions

View File

@@ -1646,7 +1646,9 @@ impl<'a> Parser<'a> {
error.emit();
Err(error)
} else {
Ok(self.mk_expr(span_lo.to(body.span), ExprKind::TryBlock(body), attrs))
let span = span_lo.to(body.span);
self.sess.gated_spans.try_blocks.borrow_mut().push(span);
Ok(self.mk_expr(span, ExprKind::TryBlock(body), attrs))
}
}