rustc_borrowck: Don't hash types in loan paths#36004
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 27, 2016
Merged
Conversation
Contributor
Author
|
cc @nikomatsakis |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 14b4d72 has been approved by |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Aug 27, 2016
rustc_borrowck: Don't hash types in loan paths 1) Types for equal loan paths are not always equal, they can sometimes differ in lifetimes, making equal loan paths hash differently. Example: https://github.com/rust-lang/rust/blob/71bdeea561355ba5adbc9a1f44f4f866a75a15c4/src/libcollections/linked_list.rs#L835-L856 One of `self.list`s has type ``` &ReFree(CodeExtent(15013/CallSiteScope { fn_id: 18907, body_id: 18912 }), BrNamed(0:DefIndex(3066), 'a(397), WontChange)) mut linked_list::LinkedList<T> ``` and other has type ``` &ReScope(CodeExtent(15018/Remainder(BlockRemainder { block: 18912, first_statement_index: 0 }))) mut linked_list::LinkedList<T> ``` (... but I'm not sure it's not a bug actually.) 2) Not hashing types is faster than hashing types. r? @arielb1
bors
added a commit
that referenced
this pull request
Aug 27, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example:
rust/src/libcollections/linked_list.rs
Lines 835 to 856 in 71bdeea
One of
self.lists has typeand other has type
(... but I'm not sure it's not a bug actually.)
r? @arielb1