if_same_then_else should not trigger when one branch is "if let <pattern> = thing" #7834
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name: if_same_then_else
I've simplified my code some, but it basically looks like this
Clippy generates the if_same_then_else diagnostic for this code.
As a matter of fact, I would love to unify the two identical branches, but as far as I know, I cannot add any other conditions to the "if let".
There should be no message from clippy here, since writing the code the way clippy suggests is not possible
Meta
Rust version (
rustc -Vv
):The text was updated successfully, but these errors were encountered: