]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #4569 - james9909:add-comparison-chain, r=oli-obk
authorbors <bors@rust-lang.org>
Thu, 26 Sep 2019 07:38:08 +0000 (07:38 +0000)
committerbors <bors@rust-lang.org>
Thu, 26 Sep 2019 07:38:08 +0000 (07:38 +0000)
Add a new lint for comparison chains

changelog: Adds a new lint: `comparison_chain`.

`comparison_chain` lints all `if` conditional chains where all the conditions are binary comparisons on the same two operands and will suggest a rewrite with `match`.

Closes #4531.

1  2 
clippy_lints/src/copies.rs
clippy_lints/src/utils/mod.rs

Simple merge
Simple merge