Closed
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.