//@ known-bug: #123134 trait Api: Sized { type Device: ?Sized; } struct OpenDevice where A::Device: Sized, { device: A::Device, queue: (), } trait Adapter { type A: Api; fn open() -> OpenDevice where ::Device: Sized; } struct ApiS; impl Api for ApiS { type Device = [u8]; } impl Adapter for T { type A = ApiS; fn open() -> OpenDevice where ::Device: Sized, { unreachable!() } } pub fn main() {}