Slash the ast::Stmt type from 104 to 24 bytes.
(on platforms with 64-bit pointers.) The StmtMac variant is rather large and also fairly rare, so let's optimise the common case.
This commit is contained in:
@@ -1461,7 +1461,7 @@ pub fn noop_fold_stmt<T: Folder>(Spanned {node, span}: Stmt, folder: &mut T)
|
||||
}))
|
||||
}
|
||||
StmtMac(mac, semi) => SmallVector::one(P(Spanned {
|
||||
node: StmtMac(folder.fold_mac(mac), semi),
|
||||
node: StmtMac(mac.map(|m| folder.fold_mac(m)), semi),
|
||||
span: span
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user