rust/clippy_lints
bors d2ddf9c796 Auto merge of #6754 - camsteffen:spanlesseq-res, r=flip1995
Teach SpanlessEq binding IDs

changelog: Fix collapsible_match false positive

Fixes #6740

This PR changes the way `SpanlessEq` determines whether two local variables are the same. Instead of checking that the names match, it checks that the `HirId`s match. If local bindings are declared within the expressions that are being compared, `SpanlessEq` will remember bindings that correspond to each other in a `FxHashMap<HirId, HirId>`. This makes `SpanlessEq` more flexible while also fixing false positives.

Example: `{ let x = 1; x + 2 }` is equal to `{ let y = 1; y + 2 }`.

CC `@xFrednet` I think this will resolve some concerns in #6463
2021-02-21 15:22:35 +00:00
..
src Auto merge of #6754 - camsteffen:spanlesseq-res, r=flip1995 2021-02-21 15:22:35 +00:00
Cargo.toml Bump clippy version 2021-02-05 18:32:28 -05:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.