From 346113bbebddbd199b61249957c7569514071e89 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 22 Nov 2021 15:57:17 +0100 Subject: support other collections via #[collection(...)] --- tests/tests.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests') 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>)>(&mut self, f: H); } + +struct MyCollection(A, B, C); +impl IntoIterator for MyCollection { + type Item = (A, B, C); + + type IntoIter = Box>; + + fn into_iter(self) -> Self::IntoIter { + todo!() + } +} + +impl FromIterator<(A, B, C)> for MyCollection { + fn from_iter>(_iter: T) -> Self { + todo!() + } +} + +#[dynamize::dynamize] +#[collection(MyCollection, 3)] +trait CustomCollection { + type A: Into; + + fn test(&self) -> MyCollection; +} -- cgit v1.2.3