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
..
2021-01-07 18:54:12 -03:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2021-02-10 16:15:29 +09:00
2021-02-10 16:15:29 +09:00
2021-02-10 16:15:29 +09:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2020-11-08 18:32:12 -05:00
2021-02-10 11:57:28 +01:00
2021-02-10 11:57:28 +01:00
2021-02-10 11:57:28 +01:00
2021-02-10 11:57:28 +01:00
2021-02-06 00:10:52 +09:00