branches_sharing_code incorrectly detects branches using the same code #7369
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: branches_sharing_code
I upgrade to rust 1.53 and tried this code:
I expected clippy to be fine with this code.
Instead, this this code was linted incorrectly with the following:
The suggested code changes what the code actually does, rather than just finding a better way to express them. In this case, if we made the change, we'd change the functionality and (thankfully) break tests asserting specific behavior.
Meta
cargo clippy -V
:clippy 0.1.53 (53cb7b09 2021-06-17)
rustc -Vv
:The text was updated successfully, but these errors were encountered: