Skip to content

More Atomic types - #6740

Closed
Aatch wants to merge 3 commits into
rust-lang:incomingfrom
Aatch:atomic-types
Closed

More Atomic types#6740
Aatch wants to merge 3 commits into
rust-lang:incomingfrom
Aatch:atomic-types

Conversation

@Aatch

Copy link
Copy Markdown
Contributor

This is a follow up to #6732. Makes everything a little more sound.

r? @brson

bors added a commit that referenced this pull request May 29, 2013
This is a follow up to #6732. Makes everything a little more sound.
r? @brson
@borsbors closed this May 29, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 25, 2021
Teach SpanlessEq binding IDs
changelog: Fix collapsible_match false positive
Fixesrust-lang#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 rust-lang#6463
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Aatch@brson@bors