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 --> |
||
|---|---|---|
| .. | ||
| test_utils | ||
| ui | ||
| ui-cargo | ||
| ui-internal | ||
| ui-toml | ||
| workspace_test | ||
| check-fmt.rs | ||
| clippy.toml | ||
| compile-test.rs | ||
| config-metadata.rs | ||
| dogfood.rs | ||
| integration.rs | ||
| lint_message_convention.rs | ||
| missing-test-files.rs | ||
| symbols-used.rs | ||
| versioncheck.rs | ||
| workspace.rs | ||