// check-pass // // Regression test for issue #78632 #![crate_type = "lib"] pub trait Corge { type Fred; } impl Corge for () { type Fred = u32; } pub trait Waldo { type Quax; } impl Waldo for u32 { type Quax = u8; } pub trait Grault where (): Corge, { type Thud; fn bar(_: <() as Corge>::Fred) {} } impl Grault for T where T: Waldo, (): Corge, <() as Corge>::Fred: Waldo, { type Thud = u8; } pub trait Plugh { fn baz(); } #[derive(Copy, Clone, Debug)] pub struct Qiz { foo: T, } impl Plugh<<() as Corge>::Fred> for Qiz where T: Grault, (): Corge, { fn baz() {} } pub fn test() { as Plugh>::baz(); }