1
Fork 0

ast: Reduce size of ExprKind by boxing fields of ExprKind::Struct

This commit is contained in:
Vadim Petrochenkov 2021-03-16 03:15:53 +03:00
parent b25d3ba781
commit d1522b39dd
12 changed files with 48 additions and 28 deletions

View file

@ -284,7 +284,10 @@ impl<'a> ExtCtxt<'a> {
path: ast::Path,
fields: Vec<ast::ExprField>,
) -> P<ast::Expr> {
self.expr(span, ast::ExprKind::Struct(path, fields, ast::StructRest::None))
self.expr(
span,
ast::ExprKind::Struct(P(ast::StructExpr { path, fields, rest: ast::StructRest::None })),
)
}
pub fn expr_struct_ident(
&self,