aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.rs')
-rw-r--r--tests/tests.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 925fe72..1bff07f 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -251,3 +251,28 @@ trait FunIter {
fn foobar2<H: Fn(&mut dyn Iterator<Item = &mut dyn Iterator<Item = Self::A>>)>(&mut self, f: H);
}
+
+struct MyCollection<A, B, C>(A, B, C);
+impl<A, B, C> IntoIterator for MyCollection<A, B, C> {
+ type Item = (A, B, C);
+
+ type IntoIter = Box<dyn Iterator<Item = (A, B, C)>>;
+
+ fn into_iter(self) -> Self::IntoIter {
+ todo!()
+ }
+}
+
+impl<A, B, C> FromIterator<(A, B, C)> for MyCollection<A, B, C> {
+ fn from_iter<T: IntoIterator<Item = (A, B, C)>>(_iter: T) -> Self {
+ todo!()
+ }
+}
+
+#[dynamize::dynamize]
+#[collection(MyCollection, 3)]
+trait CustomCollection {
+ type A: Into<String>;
+
+ fn test(&self) -> MyCollection<Self::A, Self::A, Self::A>;
+}