Skip to content
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 14 commits into from
Jul 28, 2016

Commits on Jul 22, 2016

  1. Configuration menu
    Copy the full SHA
    b2422ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8eb12d9 View commit details
    Browse the repository at this point in the history
  3. refactor type error reporting

    arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    cea88eb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b7b2db4 View commit details
    Browse the repository at this point in the history
  5. 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
    arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    fa4eda8 View commit details
    Browse the repository at this point in the history
  6. 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.
    arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    37c5696 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    712c5ca View commit details
    Browse the repository at this point in the history
  8. 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.
    arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    f3ee99b View commit details
    Browse the repository at this point in the history
  9. rustc_errors: fix a few bugs

    Ariel Ben-Yehuda authored and arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    1e4f6d5 View commit details
    Browse the repository at this point in the history
  10. use diagnostic-mutating style for note_type_err too

    that is much cleaner than the `type_err!` style I used earlier.
    Ariel Ben-Yehuda authored and arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    93a9683 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e76a46a View commit details
    Browse the repository at this point in the history
  12. Add E0560 error explanation

    GuillaumeGomez authored and arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    0304850 View commit details
    Browse the repository at this point in the history
  13. Add E0559 error explanation

    GuillaumeGomez authored and arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    23bb1df View commit details
    Browse the repository at this point in the history
  14. address review comments

    I split the RFC1592 commit out
    arielb1 committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    717e392 View commit details
    Browse the repository at this point in the history