diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-02 22:16:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-02 22:16:13 +0100 |
| commit | dbb9e224af79a6c26c7b887662c5d2c21cf51b88 (patch) | |
| tree | 7adc33772286848c56a6a5d8018fd239d1daabbc /compiler/rustc_codegen_llvm/src/back/write.rs | |
| parent | 39641319ad135007b498e9f936a2894276c65d3b (diff) | |
| parent | ba7374e517415696c383a6c7b79214d2168dff21 (diff) | |
| download | rust-dbb9e224af79a6c26c7b887662c5d2c21cf51b88.tar.gz rust-dbb9e224af79a6c26c7b887662c5d2c21cf51b88.zip | |
Rollup merge of #91435 - FabianWolff:issue-91421-if-then, r=lcnr
Improve diagnostic for missing half of binary operator in `if` condition
Fixes #91421. I've also changed it so that it doesn't consume the `else` token in the error case, because it will try to consume it again afterwards, leading to this incorrect error message (where the `else` reported as missing is actually there):
```
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{`
--> src/main.rs:4:12
|
4 | } else { 4 };
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
```
r? `@lcnr`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
0 files changed, 0 insertions, 0 deletions
