diff --git a/tests/throws.rs b/tests/throws.rs index d44b80d..88b693e 100644 --- a/tests/throws.rs +++ b/tests/throws.rs @@ -101,3 +101,18 @@ mod foo { throw!(0); } } + +mod foo_trait_obj { + use fehler::throws; + trait FooTrait {} + + struct FooStruct; + + struct FooError; + impl FooTrait for FooStruct {} + + #[throws(FooError)] + fn foo() -> Box { + Box::new(FooStruct) + } +} \ No newline at end of file