about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTimo <30553356+y21@users.noreply.github.com>2025-07-09 21:04:18 +0000
committerGitHub <noreply@github.com>2025-07-09 21:04:18 +0000
commit012e5f538bc5969e235b74fd2f264c93475b5932 (patch)
tree1abbccd7872020af4b32eb6757628be42cf70ea6 /compiler/rustc_codegen_llvm/src
parenta24fb386b14b4fe9812b033b9c960a9126175486 (diff)
parentd8ba94b0ae59b9e140f65bce27527c12357bfbf7 (diff)
downloadrust-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