diff --git a/src/test/ui/inference/issue-70703.rs b/src/test/ui/inference/issue-70703.rs new file mode 100644 index 00000000000..d90498e96ea --- /dev/null +++ b/src/test/ui/inference/issue-70703.rs @@ -0,0 +1,26 @@ +// 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