Associated trait bounds bug in lifetime-generate
utaal-b opened this issue · comments
Andrea Lattuada (VMware) commented
Minimized repro thanks to @marshtompsxd:
pub trait A {
type Input: View;
type Output: View;
}
pub trait B {
type MyA: A;
fn foo(input: <Self::MyA as A>::Input) -> <Self::MyA as A>::Output;
}
fails with:
the trait bound `<A51_Self as T87_B>::A86_MyA: T85_A` is not satisfied
@tjhance diagnosed this to be due to lifetime-generate not adding bounds in this case, despite being still relied upon by the signature of foo
.
trait T26_A {
type A24_Input;
type A25_Output;
}
trait T29_B {
type A28_MyA;
}