Open
Description
This doesn't compile although it should
struct Equal<'a, 'b>(&'a &'b (), &'b &'a ()); // implies 'a == 'b
trait Trait { type Ty; }
impl<'x> Trait for Equal<'x, 'x> { type Ty = (); }
fn test<'a, 'b>(_: (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>)) {}
//~^ ERROR lifetime may not live long enough
It compiles with this trivial change:
- fn test<'a, 'b>(_: (<Equal<'a, 'b> as Trait>::Ty, Equal<'a, 'b>)) {}
+ fn test<'a, 'b>(_: <Equal<'a, 'b> as Trait>::Ty, _: Equal<'a, 'b>) {}
@rustbot label C-bug T-types A-implied-bounds