diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-21 09:37:32 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-21 09:39:40 +0100 |
commit | 57641e00d6ed1fd7689c3079abb10f67d5387143 (patch) | |
tree | adb48bb70be52bc6035d93826f7725dd64054b49 /tests/tests.rs | |
parent | 34dc166a9bc003bad36c28aeb29b625195d20a74 (diff) |
support -> &mut dyn Iterator<Item = Self::A>
Diffstat (limited to 'tests/tests.rs')
-rw-r--r-- | tests/tests.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 3139185..8bbb5b3 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -203,3 +203,17 @@ fn test3<T: TypeWithSuper>(some: T) { let dyn_trait: &dyn DynTypeWithSuper = &some; println!("{}", dyn_trait); } + +#[dynamize::dynamize] +trait ReturnIter { + type A: std::error::Error; + + fn foobar(&mut self, text: &str) -> &mut dyn Iterator<Item = Self::A>; +} + +#[dynamize::dynamize] +trait FunIter { + type A: std::error::Error; + + fn foobar<F: Fn(&mut dyn Iterator<Item = Self::A>)>(&mut self, f: F); +} |