-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.