Skip to content

normalizing parameter environments uses an empty free-region-map #45937

Closed

Description

@nikomatsakis

The following program gets a (spurious) region error (E0495):

trait Project<'a, 'b> {
    type Item;
}

impl<'a, 'b> Project<'a, 'b> for ()
where 'a: 'b
{
    type Item = ();
}

fn foo<'a: 'b, 'b>()
where <() as Project<'a, 'b>>::Item : Eq
{
}

fn main() { }

The cause for this problem, I believe, is that during the normalize environment phase we use an empty FreeRegionMap, and thus do not let the region inferencer does not know that 'a: 'b holds.

I have a fix on a local branch.

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Nov 11, 2017
  2. added 14 commits that reference this issue on Nov 16, 2017
    987c6a7
    08471fe
    e0780f8
    c9be249
    5562663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions