Uh oh!
There was an error while loading. Please reload this page.
On type mismatch error highlight & when type matches - #46349
Merged
Conversation
When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
rust-highfive
commented
Nov 28, 2017
Contributor
(rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Nov 28, 2017
ContributorAuthor
| (&ty::TyFloat(_), &ty::TyInfer(ty::InferTy::FloatVar(_))) | | ||
| (&ty::TyInfer(ty::InferTy::FloatVar(_)), &ty::TyFloat(_)) | | ||
| (&ty::TyInfer(ty::InferTy::FloatVar(_)), | ||
| &ty::TyInfer(ty::InferTy::FloatVar(_))) => true, |
Contributor
There was a problem hiding this comment.
Would it be possible to do some sort of cannonical sorting here to get rid of duplicate cases?
EDIT: By "duplicate" I mean mirrored.
michaelwoerister
commented
Nov 29, 2017
Member
I like it but maybe someone with more type-checking involvement can review? r? @nikomatsakis for dispatch |
arielb1
commented
Nov 29, 2017
Contributor
@bors r+ |
bors
commented
Nov 29, 2017
Collaborator
📌 Commit 677381a has been approved by |
Contributor
Umm test failure @bors r- |
estebank
commented
Nov 29, 2017
ContributorAuthor
bors
commented
Nov 29, 2017
Collaborator
📌 Commit 02808f1 has been approved by |
arielb1 pushed a commit
to arielb1/rust
that referenced
this pull request
Nov 30, 2017
On type mismatch error highlight `&` when type matches When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
arielb1 pushed a commit
to arielb1/rust
that referenced
this pull request
Nov 30, 2017
On type mismatch error highlight `&` when type matches When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
arielb1 pushed a commit
to arielb1/rust
that referenced
this pull request
Nov 30, 2017
On type mismatch error highlight `&` when type matches When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
arielb1 pushed a commit
to arielb1/rust
that referenced
this pull request
Nov 30, 2017
On type mismatch error highlight `&` when type matches When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
bors
commented
Dec 2, 2017
Collaborator
bors added a commit
that referenced
this pull request
Dec 2, 2017
On type mismatch error highlight `&` when type matches When the only difference between the two types in a type error is that one is a reference to the other type (`T` vs `&T`) or both are references differing only in their mutability (`&T` vs `&mut T`), don't highlight the type (`T`).
bors
commented
Dec 2, 2017
Collaborator
☀️ Test successful - status-appveyor, status-travis |
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 freeto 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.


When the only difference between the two types in a type error is that
one is a reference to the other type (
Tvs&T) or both arereferences differing only in their mutability (
&Tvs&mut T), don'thighlight the type (
T).