//@ check-pass pub trait FirstTrait { type Item; type Extra: Extra<(), Error = Self::Item>; } trait SecondTrait { type Item2; } trait ThirdTrait: SecondTrait { type Item3; } trait FourthTrait { type Item4; } impl SecondTrait for First where First: FirstTrait, { type Item2 = First::Extra; } impl ThirdTrait for Second where Second: SecondTrait, { type Item3 = T; } impl FourthTrait for Third where Third: ThirdTrait, { type Item4 = S; } pub trait Extra { type Error; } struct ImplShoulExist { _gen: (D, Req), } impl ImplShoulExist where D: FourthTrait, D::Item4: Extra, >::Error: Into<()>, { fn access_fn(_: D) { todo!() } } impl Extra for ImplShoulExist { type Error = (); } pub fn broken(ms: MS) where MS: FirstTrait, MS::Item: Into<()>, { // Error: Apparently Balance::new doesn't exist during MIR validation ImplShoulExist::::access_fn(ms); } fn main() {}