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