// Another regression test for #109815. // check-pass #![feature(min_specialization)] #![feature(rustc_attrs)] #[rustc_specialization_trait] trait X {} trait Z { type Assoc: X; } struct A(T); impl X for () {} impl Z for A { type Assoc = (); } trait MyFrom { fn from(other: T) -> Self; } impl MyFrom<()> for T { default fn from(other: ()) -> T { panic!(); } } impl MyFrom< as Z>::Assoc> for T { fn from(other: ()) -> T { panic!(); } } fn main() {}