diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2021-03-25 18:05:49 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2021-03-25 18:05:49 -0400 |
| commit | 7504b9bb96236a340c41c95f95cf3c4a09341afc (patch) | |
| tree | 54573f6a3e8b9a56c92e10925fab978fe48e06bb /compiler/rustc_parse/src/parser/mod.rs | |
| parent | fe60f19f7e98af78526364563fa6b40825fa97a8 (diff) | |
| download | rust-7504b9bb96236a340c41c95f95cf3c4a09341afc.tar.gz rust-7504b9bb96236a340c41c95f95cf3c4a09341afc.zip | |
Avoid double-collection for expression nonterminals
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 71103840f13..f0ee76d328c 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -987,7 +987,7 @@ impl<'a> Parser<'a> { } // Collect tokens because they are used during lowering to HIR. - let expr = self.collect_tokens_no_attrs(|this| this.parse_expr())?; + let expr = self.parse_expr_force_collect()?; let span = expr.span; match &expr.kind { |
