-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Centralize and clean type error reporting #34907
Merged
Merged
Commits on Jul 22, 2016
-
Configuration menu - View commit details
-
Copy full SHA for b2422ab - Browse repository at this point
Copy the full SHA b2422abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8eb12d9 - Browse repository at this point
Copy the full SHA 8eb12d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for cea88eb - Browse repository at this point
Copy the full SHA cea88ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7b2db4 - Browse repository at this point
Copy the full SHA b7b2db4View commit details -
switch projection errors to use the new type error messages
Unfortunately, projection errors do not come with a nice set of mismatched types. This is because the type equality check occurs within a higher-ranked context. Therefore, only the type error is reported. This is ugly but was always the situation. I will introduce better errors for the lower-ranked case in another commit. Fixes the last known occurence of rust-lang#31173
Configuration menu - View commit details
-
Copy full SHA for fa4eda8 - Browse repository at this point
Copy the full SHA fa4eda8View commit details -
refactor constant evaluation error reporting
Refactor constant evaluation to use a single error reporting function that reports a type-error-like message. Also, unify all error codes with the "constant evaluation error" message to just E0080, and similarly for a few other duplicate codes. The old situation was a total mess, and now that we have *something* we can further iterate on the UX.
Configuration menu - View commit details
-
Copy full SHA for 37c5696 - Browse repository at this point
Copy the full SHA 37c5696View commit details -
Configuration menu - View commit details
-
Copy full SHA for 712c5ca - Browse repository at this point
Copy the full SHA 712c5caView commit details -
try to recover the non-matching types in projection errors
The type equation in projection takes place under a binder and a snapshot, which we can't easily take types out of. Instead, when encountering a projection error, try to re-do the projection and find the type error then. This fails to produce a sane type error when the failure was a "leak_check" failure. I can't think of a sane way to show *these*, so I just left them use the old crappy representation, and added a test to make sure we don't break them.
Configuration menu - View commit details
-
Copy full SHA for f3ee99b - Browse repository at this point
Copy the full SHA f3ee99bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e4f6d5 - Browse repository at this point
Copy the full SHA 1e4f6d5View commit details -
use diagnostic-mutating style for
note_type_err
toothat is much cleaner than the `type_err!` style I used earlier.
Configuration menu - View commit details
-
Copy full SHA for 93a9683 - Browse repository at this point
Copy the full SHA 93a9683View commit details -
Configuration menu - View commit details
-
Copy full SHA for e76a46a - Browse repository at this point
Copy the full SHA e76a46aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0304850 - Browse repository at this point
Copy the full SHA 0304850View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23bb1df - Browse repository at this point
Copy the full SHA 23bb1dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 717e392 - Browse repository at this point
Copy the full SHA 717e392View commit details
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.