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

make generalization code create new variables in correct universe #58056

Merged
merged 4 commits into from
Feb 21, 2019

Commits on Feb 15, 2019

  1. print more information for closures when -Zverbose is given

    Ideally, we'd probably print the closure substs themselves actually.
    nikomatsakis authored and pnkfelix committed Feb 15, 2019
    Configuration menu
    Copy the full SHA
    378741b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a49c9fb View commit details
    Browse the repository at this point in the history
  3. make generalization code create new variables in correct universe

    In our type inference system, when we "generalize" a type T to become
    a suitable value for a type variable V, we sometimes wind up creating
    new inference variables. So, for example, if we are making V be some
    subtype of `&'X u32`, then we might instantiate V with `&'Y u32`.
    This generalized type is then related `&'Y u32 <: &'X u32`, resulting
    in a region constriant `'Y: 'X`. Previously, however, we were making
    these fresh variables like `'Y` in the "current universe", but they
    should be created in the universe of V. Moreover, we sometimes cheat
    in an invariant context and avoid creating fresh variables if we know
    the result must be equal -- we can only do that when the universes
    work out.
    nikomatsakis authored and pnkfelix committed Feb 15, 2019
    Configuration menu
    Copy the full SHA
    4db6a9b View commit details
    Browse the repository at this point in the history
  4. fix tests post-rebase

    pnkfelix committed Feb 15, 2019
    Configuration menu
    Copy the full SHA
    9661ee6 View commit details
    Browse the repository at this point in the history