diff options
| author | bors <bors@rust-lang.org> | 2022-10-01 17:11:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-01 17:11:19 +0000 |
| commit | 56a35bc906be1250a76fdb9a4b70e9261e10aec5 (patch) | |
| tree | fadad570b55acc7b2df2f40d110f6ecf0b54b36e /compiler/rustc_parse/src/parser/expr.rs | |
| parent | edadc7ccdda644ef8149869d2f24018a1dac202a (diff) | |
| parent | 51e2f03af28c8e2a83a7cb51d8482297d8326260 (diff) | |
| download | rust-56a35bc906be1250a76fdb9a4b70e9261e10aec5.tar.gz rust-56a35bc906be1250a76fdb9a4b70e9261e10aec5.zip | |
Auto merge of #102545 - matthiaskrgr:rollup-13i3tc3, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #101675 (Improve `File::set_times` error handling) - #102500 (Remove `expr_parentheses_needed` from `ParseSess`) - #102533 (rustdoc: remove unused CSS selector `a.source`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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 }) |
