Avoid double-collection for expression nonterminals

This commit is contained in:
Aaron Hill
2021-03-25 18:05:49 -04:00
parent fe60f19f7e
commit 7504b9bb96
3 changed files with 17 additions and 17 deletions

View File

@@ -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 {