summary refs log tree commit diff stats
path: root/tests/98-readme.rs
blob: bad1f34fdb52625de6a55333ef90da60909a17a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use impl_trait::impl_trait;

struct Foo;

trait Bar {}

impl_trait! {
  /// Yes, you can write docs here.
  impl Foo {
    /// You can write docs here too.
    fn as_dyn_bar(&self) -> &dyn Bar {
      self
    }
    /// You can even write docs here!
    impl trait Bar {
    }
  }
}

fn main() {}