diff options
Diffstat (limited to 'tests/06-impl-trait.rs')
-rw-r--r-- | tests/06-impl-trait.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/06-impl-trait.rs b/tests/06-impl-trait.rs new file mode 100644 index 0000000..ca0d2ee --- /dev/null +++ b/tests/06-impl-trait.rs @@ -0,0 +1,20 @@ +// Checks that `impl trait` works. + +use impl_trait::impl_trait; + +struct Foo; +trait Bar { +} + +impl_trait! { + impl Foo { + impl trait Bar { + } + } +} + +fn static_assert<T: Bar>(_t: T) {} + +fn main() { + static_assert(Foo); +} |