about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-05 12:23:58 +0000
committerbors <bors@rust-lang.org>2025-09-05 12:23:58 +0000
commit9cd272dc85320e85a8c83a1a338870de52c005f3 (patch)
treebbb73f86bfaf252ec2e71af536d9122f6e02d80f /compiler/rustc_codegen_ssa
parentc559c4a741836c4ffa8e4f60cb9fe7e92af5298e (diff)
parentff60e5c3f3a00fcf03fc4d50432cd76f2a890a9f (diff)
downloadrust-9cd272dc85320e85a8c83a1a338870de52c005f3.tar.gz
rust-9cd272dc85320e85a8c83a1a338870de52c005f3.zip
Auto merge of #146044 - estebank:issue-88727, r=chenyukang
Suggest parentheses when `match` or `if` expression in binop is parsed as statement

```
error[E0308]: mismatched types
  --> $DIR/expr-as-stmt.rs:81:5
   |
LL |     match () { _ => true } && match () { _ => true };
   |     ^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `bool`
   |
help: parentheses are required to parse this as an expression
   |
LL |     (match () { _ => true }) && match () { _ => true };
   |     +                      +
```

Address the common case from rust-lang/rust#88727. The original parse error is still outstanding, but the cases brought up in the thread are resolved.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
0 files changed, 0 insertions, 0 deletions