Skip to content

Commit 9729f54

Browse files
committed
Merge pull request withoutboats#57 from earthengine/master
Add unit test for issue 55
2 parents cc7b192 + 2edcec3 commit 9729f54

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎tests/throws.rs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,18 @@ mod foo {
101101
throw!(0);
102102
}
103103
}
104+
105+
mod foo_trait_obj {
106+
use fehler::throws;
107+
trait FooTrait {}
108+
109+
struct FooStruct;
110+
111+
struct FooError;
112+
impl FooTrait for FooStruct {}
113+
114+
#[throws(FooError)]
115+
fn foo() -> Box<dyn FooTrait> {
116+
Box::new(FooStruct)
117+
}
118+
}

0 commit comments

Comments
 (0)