Use Lit rather than P<Lit> in ast::ExprKind.

Because it results in fewer allocations and small speedups on some
benchmarks.
This commit is contained in:
Nicholas Nethercote 2018-11-08 15:55:52 +11:00
parent 0117b42f66
commit 706c2ad651
6 changed files with 7 additions and 7 deletions

View file

@ -1086,7 +1086,7 @@ pub enum ExprKind {
/// A unary operation (For example: `!x`, `*x`)
Unary(UnOp, P<Expr>),
/// A literal (For example: `1`, `"foo"`)
Lit(P<Lit>),
Lit(Lit),
/// A cast (`foo as f64`)
Cast(P<Expr>, P<Ty>),
Type(P<Expr>, P<Ty>),