diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2018-11-08 18:15:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-08 18:15:19 -0700 |
| commit | 686de87d2f67732750a87d706a7c1d123c36fc87 (patch) | |
| tree | d9ce4991f60869f32bea5350d5ccb8ff0499eb22 /src/libsyntax/parse | |
| parent | 7125b8fa074df8de219b246d464c497c3847a979 (diff) | |
| parent | 706c2ad651c1b2db95aeb4efc9acf5d0b42d5640 (diff) | |
| download | rust-686de87d2f67732750a87d706a7c1d123c36fc87.tar.gz rust-686de87d2f67732750a87d706a7c1d123c36fc87.zip | |
Rollup merge of #55777 - nnethercote:less-P-in-ast, r=petrochenkov
Use `Lit` rather than `P<Lit>` in `ast::ExprKind`. Because it results in fewer allocations and small speedups on some benchmarks.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c8a686da179..68e7e40c43e 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1989,7 +1989,7 @@ impl<'a> Parser<'a> { let minus_lo = self.span; let minus_present = self.eat(&token::BinOp(token::Minus)); let lo = self.span; - let literal = P(self.parse_lit()?); + let literal = self.parse_lit()?; let hi = self.prev_span; let expr = self.mk_expr(lo.to(hi), ExprKind::Lit(literal), ThinVec::new()); |
