diff options
| author | Michael Goulet <michael@errs.io> | 2022-09-30 01:38:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-09-30 01:39:20 +0000 |
| commit | 85a726e7540b801924cfb207e7b5714e00080471 (patch) | |
| tree | 5bae06cfc9e67a5bf98a0ec81de89e60452bb811 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 9f1a21ae2bd41b3dd335c44f38f29a1fb8712ddc (diff) | |
| download | rust-85a726e7540b801924cfb207e7b5714e00080471.tar.gz rust-85a726e7540b801924cfb207e7b5714e00080471.zip | |
Remove expr_parentheses_needed from ParseSess
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 8b328e593ae..11301f03e48 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -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 }) |
