1
Fork 0

Factor out StmtKind::MacCall fields into MacCallStmt struct

In PR #76130, I add a fourth field, which makes using a tuple variant
somewhat unwieldy.
This commit is contained in:
Aaron Hill 2020-08-30 18:38:32 -04:00
parent 85fbf49ce0
commit 090b16717a
No known key found for this signature in database
GPG key ID: B4087E510E98B164
8 changed files with 32 additions and 23 deletions

View file

@ -692,7 +692,7 @@ pub fn walk_stmt<'a, V: Visitor<'a>>(visitor: &mut V, statement: &'a Stmt) {
StmtKind::Expr(ref expr) | StmtKind::Semi(ref expr) => visitor.visit_expr(expr),
StmtKind::Empty => {}
StmtKind::MacCall(ref mac) => {
let (ref mac, _, ref attrs) = **mac;
let MacCallStmt { ref mac, style: _, ref attrs } = **mac;
visitor.visit_mac(mac);
for attr in attrs.iter() {
visitor.visit_attribute(attr);