diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-09-01 18:24:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-01 18:24:33 -0700 |
| commit | 738b8eadfd16583dae5f77ce736e126779093ace (patch) | |
| tree | b72e15f377d345544842bfa8dfc6709c9ef58f91 /compiler/rustc_parse/src/parser | |
| parent | 9a055826f97ec15c0cc7743b7dfe6b6b215aeb1e (diff) | |
| parent | ee1902157ec737626376e94ef2e6887ed5ac8329 (diff) | |
| download | rust-738b8eadfd16583dae5f77ce736e126779093ace.tar.gz rust-738b8eadfd16583dae5f77ce736e126779093ace.zip | |
Rollup merge of #76132 - Aaron1011:mac-call-stmt, r=petrochenkov
Factor out StmtKind::MacCall fields into `MacCallStmt` struct In PR #76130, I add a fourth field, which makes using a tuple variant somewhat unwieldy.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/stmt.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index 0f522fd788c..947ca6b5bd5 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -10,7 +10,7 @@ use rustc_ast as ast; use rustc_ast::ptr::P; use rustc_ast::token::{self, TokenKind}; use rustc_ast::util::classify; -use rustc_ast::{AttrStyle, AttrVec, Attribute, MacCall, MacStmtStyle}; +use rustc_ast::{AttrStyle, AttrVec, Attribute, MacCall, MacCallStmt, MacStmtStyle}; use rustc_ast::{Block, BlockCheckMode, Expr, ExprKind, Local, Stmt, StmtKind, DUMMY_NODE_ID}; use rustc_errors::{Applicability, PResult}; use rustc_span::source_map::{BytePos, Span}; @@ -107,7 +107,7 @@ impl<'a> Parser<'a> { let kind = if delim == token::Brace || self.token == token::Semi || self.token == token::Eof { - StmtKind::MacCall(P((mac, style, attrs))) + StmtKind::MacCall(P(MacCallStmt { mac, style, attrs })) } else { // Since none of the above applied, this is an expression statement macro. let e = self.mk_expr(lo.to(hi), ExprKind::MacCall(mac), AttrVec::new()); |
