diff options
Diffstat (limited to 'tests/tests.rs')
-rw-r--r-- | tests/tests.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 3a14811..448af64 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -187,3 +187,15 @@ fn type_trait_bound_static_test( ) -> Option<Box<dyn std::error::Error>> { t.foobar("test").err() } + +#[dynamize::dynamize] +trait TypeWithSuper: std::fmt::Display + Sized { + type A: std::error::Error; + + fn foobar(&self, text: &str) -> Result<i32, Self::A>; +} + +fn test3<T: TypeWithSuper>(some: T) { + let dyn_trait: &dyn DynTypeWithSuper = &some; + println!("{}", dyn_trait); +} |