diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 18:38:32 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-08-30 18:38:53 -0400 |
| commit | 090b16717a3bfbc2a35b51032f3849f372c67fad (patch) | |
| tree | 567f059f7576a0e7add93d55643568b3da224a73 /compiler/rustc_parse/src | |
| parent | 85fbf49ce0e2274d0acf798f6e703747674feec3 (diff) | |
| download | rust-090b16717a3bfbc2a35b51032f3849f372c67fad.tar.gz rust-090b16717a3bfbc2a35b51032f3849f372c67fad.zip | |
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')
| -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 ac067cb0eab..341590c622c 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}; @@ -106,7 +106,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()); |
