diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2024-02-18 05:00:49 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2024-02-18 05:00:49 +0000 |
| commit | 3ef558ec1561a3a548748e6a9967630aea8c6ca5 (patch) | |
| tree | 906f15cbccbf29d60c6ffc822f783b6c16db1fb6 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | d18d4615c4f58e70799f56dc916f839a8019e2cb (diff) | |
| parent | 864cee3ea383cc8254ba394ba355e648faa9cfa5 (diff) | |
| download | rust-3ef558ec1561a3a548748e6a9967630aea8c6ca5.tar.gz rust-3ef558ec1561a3a548748e6a9967630aea8c6ca5.zip | |
Merge from rustc
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 2424b6c130d..20b9581f2ef 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1433,7 +1433,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) = this.sess.ambiguous_block_expr_parse.borrow().get(&lo) { - err.subdiagnostic(ExprParenthesesNeeded::surrounding(*sp)); + err.subdiagnostic(this.dcx(), ExprParenthesesNeeded::surrounding(*sp)); } err }) |
