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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |