diff options
| author | Timo <30553356+y21@users.noreply.github.com> | 2025-07-09 21:04:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 21:04:18 +0000 |
| commit | 012e5f538bc5969e235b74fd2f264c93475b5932 (patch) | |
| tree | 1abbccd7872020af4b32eb6757628be42cf70ea6 /compiler/rustc_codegen_llvm/src | |
| parent | a24fb386b14b4fe9812b033b9c960a9126175486 (diff) | |
| parent | d8ba94b0ae59b9e140f65bce27527c12357bfbf7 (diff) | |
| download | rust-012e5f538bc5969e235b74fd2f264c93475b5932.tar.gz rust-012e5f538bc5969e235b74fd2f264c93475b5932.zip | |
Fix `manual_is_variant_and` condition generation (#15206)
When comparing `x.map(func) == Some(bool_lit)`, the value of `bool_lit` was ignored, despite the fact that its value should determine the value of the proposed expression. `func` can be either a closure or a path. For the latter, η-expansion will be used if needed to invert the result of the function call. changelog: [`manual_is_variant_and`]: fix inverted suggestions that could lead to code with different semantics Fixes rust-lang/rust-clippy#15202 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> ### Summary Notes - [Beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15206#issuecomment-3034006613) by [samueltardieu](https://github.com/samueltardieu) *Managed by `@rustbot`—see [help](https://forge.rust-lang.org/triagebot/note.html) for details* <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
