// check-pass trait Factory { type Product; } impl Factory for () { type Product = (); } trait ProductConsumer

{ fn consume(self, product: P); } impl

ProductConsumer

for () { fn consume(self, _: P) {} } fn make_product_consumer(_: F) -> impl ProductConsumer { () } fn main() { let consumer = make_product_consumer(()); consumer.consume(()); }