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

Implement (most of) RFC 1214 #27641

Merged
merged 38 commits into from
Aug 14, 2015
Merged

Commits on Aug 12, 2015

  1. Don't report a hard error if there are inference failures until

    after we check casts, because sometimes casts can influence inference,
    unfortunately. We do re-run `select_all_trait_obligations` during
    regionck anyhow.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    4561607 View commit details
    Browse the repository at this point in the history
  2. Define the wf and outlives relation separately, unlike the existing

    `implicator`. These definitions are also in accordance with RFC 1214 (or
    more so), and hence somewhat different from the implicator. This commit
    also modifies the implicator to remove the older rules for projections,
    which can easily trigger infinite loops.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    9289552 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b196315 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ad47bd8 View commit details
    Browse the repository at this point in the history
  5. Implement a new wfcheck to replace the old wf; this new code only issues

    warnings. It also checks more conditions than the old code.  Keep the
    old wf code around unchanged so that we can continue to issue errors for
    the cases where we used to report errors.
    
    As part of this, remove the where-clauses-must-reference-parameter rule,
    which is easily circumvented.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    8d98877 View commit details
    Browse the repository at this point in the history
  6. New WF condition requires checking that argument types are WF

    on every call. This ensures that implies bounds are reasonable
    (the older code only checked that the values provided had WF types, but
    we also must know that the formal types of the arguments are WF.)
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    6bb1e22 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    39d164d View commit details
    Browse the repository at this point in the history
  8. Introduce a "origin/cause" for new requirements (or bugfixes...) intr…

    …oduced by RFC 1214,
    
    and issue a warning (and explanatory note) when we encounter such a
    thing.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    75ee8f1 View commit details
    Browse the repository at this point in the history
  9. Generalize the outlives rule for projections to handle the new cases;

    also, generalize VerifyBounds to include OR conditions.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    d159977 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    788a802 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    91b3e9c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d15d743 View commit details
    Browse the repository at this point in the history
  13. Fallout in tests -- we now report an error if you even reference a type

    `&Foo` where `Foo` is a trait that is not object-safe
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    09bf2fe View commit details
    Browse the repository at this point in the history
  14. Fallout in tests -- break the object safety part into a separate file…

    … because error
    
    will be in future reported by wfcheck, which runs in a later stage than
    coherence
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    92d16d9 View commit details
    Browse the repository at this point in the history
  15. Fallout in tests -- break this test into three tests, since we later saw

    staging differences in terms of when errors were reported
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    532fcb2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f4aaedb View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    dee8b54 View commit details
    Browse the repository at this point in the history
  18. Fallout in tests -- explain an interesting test failure having to

    do with dropck and the new outlives rules
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    7ed39c6 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ff39ee9 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    b7e849b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    0582fed View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    9c3a866 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    c9a49f9 View commit details
    Browse the repository at this point in the history
  24. regionck.rs: correct misuse of ty.regions() rather than regions()

    and add a test that was (incorrectly) failing to compile with
    existing code
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    fb1b6fc View commit details
    Browse the repository at this point in the history
  25. traits: consider whether origin is RFC1214 when caching, ensuring

    that the test rfc1214-warn-and-error.rs reports an error
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    9c5cfea View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a264440 View commit details
    Browse the repository at this point in the history
  27. outlives.rs: remove use of ty.walk and replace with recursive of

    ty.walk_shallow, add add'l comments.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    a7c9a15 View commit details
    Browse the repository at this point in the history
  28. check/wf.rs: change to use correct span and older WF algorithm;

    at the time I reinstituted the old code, I hadn't given up yet and
    brought back the implicator.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    2b2a113 View commit details
    Browse the repository at this point in the history
  29. Update test error messages based on changes to wfcheck; also, break

    apart the tests that tested many things at once.
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    157422a View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    c106dd4 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    213326c View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    fda9b83 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ad700ab View commit details
    Browse the repository at this point in the history
  34. regionck.rs: experimentally adopt a more conservative strategy for

    projection outlives relations that prefers not to add extract edges to
    region graph
    nikomatsakis committed Aug 12, 2015
    Configuration menu
    Copy the full SHA
    9f3f69e View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2015

  1. Configuration menu
    Copy the full SHA
    e1fa00b View commit details
    Browse the repository at this point in the history
  2. expr_use_visitor: Remove FIXME that is no longer needed (and in fact

    causes errors, post rebase). Issue rust-lang#27592 is still alive and well,
    whatever it is.
    nikomatsakis committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    33200a3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    401a243 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2015

  1. Correct nits from @nrc

    nikomatsakis committed Aug 14, 2015
    Configuration menu
    Copy the full SHA
    7f8942c View commit details
    Browse the repository at this point in the history