diff options
| author | bors <bors@rust-lang.org> | 2023-12-27 00:22:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-27 00:22:27 +0000 |
| commit | eee93d839654def74bee9c98c4e7785d29d993cb (patch) | |
| tree | 9fccd1f71e64f1f6dbcc5eeaca1ef1fc6de33d09 /compiler/rustc_pattern_analysis | |
| parent | 2df6406b886757a3c1475957660a3a4ae6c786de (diff) | |
| parent | dc30eb19677a3dd178660ce6f903c3d0a18c847d (diff) | |
| download | rust-eee93d839654def74bee9c98c4e7785d29d993cb.tar.gz rust-eee93d839654def74bee9c98c4e7785d29d993cb.zip | |
Auto merge of #119328 - estebank:might_coerce_eq_typo, r=compiler-errors
Suggest `=` to `==` in more cases, even in the face of reference mismatch
Given `foo: &String` and `bar: str`, suggest `==` when given `if foo = bar {}`:
```
error[E0308]: mismatched types
--> $DIR/assignment-expected-bool.rs:37:8
|
LL | if foo = bar {}
| ^^^^^^^^^ expected `bool`, found `()`
|
help: you might have meant to compare for equality
|
LL | if foo == bar {}
| +
```
Diffstat (limited to 'compiler/rustc_pattern_analysis')
0 files changed, 0 insertions, 0 deletions
