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

[BETA] Universe leak check #58641

Closed

Commits on Feb 22, 2019

  1. 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 committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    3e41331 View commit details
    Browse the repository at this point in the history
  2. s/skol_/placeholder_/

    nikomatsakis committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    6908300 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed3ac1a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ed747ea View commit details
    Browse the repository at this point in the history
  5. introduce a dummy leak check and invoke it in all the right places

    This set of diffs was produced by combing through
    b68fad6 and seeing where the
    `leak_check` used to be invoked and how.
    nikomatsakis committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    bdc70a0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f8fdb9a View commit details
    Browse the repository at this point in the history
  7. update test files to reflect new output

    One surprise: old-lub-glb-object.rs, may indicate a bug
    nikomatsakis committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    b0fd835 View commit details
    Browse the repository at this point in the history
  8. partially revert 904a0bd

    This preserves the error you currently get on stable for the
    old-lub-glb-object.rs test.
    nikomatsakis committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    c820008 View commit details
    Browse the repository at this point in the history