ast: Reduce size of ExprKind
by boxing fields of ExprKind::Struct
This commit is contained in:
parent
b25d3ba781
commit
d1522b39dd
12 changed files with 48 additions and 28 deletions
|
@ -2373,7 +2373,11 @@ impl<'a> Parser<'a> {
|
|||
|
||||
let span = pth.span.to(self.token.span);
|
||||
self.expect(&token::CloseDelim(token::Brace))?;
|
||||
let expr = if recover_async { ExprKind::Err } else { ExprKind::Struct(pth, fields, base) };
|
||||
let expr = if recover_async {
|
||||
ExprKind::Err
|
||||
} else {
|
||||
ExprKind::Struct(P(ast::StructExpr { path: pth, fields, rest: base }))
|
||||
};
|
||||
Ok(self.mk_expr(span, expr, attrs))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue