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 struct_tail normalize when possible #62585

Commits on Jul 12, 2019

  1. Replace struct_tail and struct_lockstep_tails with variants handl…

    …ing normalization.
    
    The old struct tail functions did not deal with `<T as Trait>::A` and `impl
    Trait`, at least not explicitly. (We didn't notice this bug before because it
    is only exposed when the tail (post deep normalization) is not `Sized`, so it
    was a rare case to deal with.)
    
    For post type-checking (i.e. during codegen), there is now
    `struct_tail_erasing_lifetimes` and `struct_lockstep_tails_erasing_lifetimes`,
    which each take an additional `ParamEnv` argument to drive normalization.
    
    For pre type-checking cases where normalization is not needed, there is
    `struct_tail_without_normalization`. (Currently, the only instance of this is
    `Expectation::rvalue_hint`.)
    
    All of these new entrypoints work by calling out to common helper routines.
    The helpers are parameterized over a closure that handles the normalization.
    pnkfelix committed Jul 12, 2019
    Configuration menu
    Copy the full SHA
    8f171c4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e4b8af5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3c8279a View commit details
    Browse the repository at this point in the history