mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-17 11:05:20 +00:00
d2ddf9c796
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 |
||
---|---|---|
.. | ||
auxiliary | ||
cargo | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
compile-test.rs | ||
dogfood.rs | ||
fmt.rs | ||
integration.rs | ||
missing-test-files.rs | ||
versioncheck.rs |