Remove expr_parentheses_needed from ParseSess

This commit is contained in:
Michael Goulet 2022-09-30 01:38:15 +00:00
parent 9f1a21ae2b
commit 85a726e754
7 changed files with 14 additions and 17 deletions

View file

@ -1310,7 +1310,7 @@ impl<'a> Parser<'a> {
// If the input is something like `if a { 1 } else { 2 } | if a { 3 } else { 4 }`
// then suggest parens around the lhs.
if let Some(sp) = self.sess.ambiguous_block_expr_parse.borrow().get(&lo) {
self.sess.expr_parentheses_needed(&mut err, *sp);
err.subdiagnostic(ExprParenthesesNeeded::surrounding(*sp));
}
err
})