• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use async_trait::async_trait;
2 
3 struct A;
4 struct B;
5 
6 #[async_trait]
7 pub trait Trait<'r> {
method(&'r self)8     async fn method(&'r self);
9 }
10 
11 #[async_trait]
12 impl Trait for A {
method(&self)13     async fn method(&self) { }
14 }
15 
16 #[async_trait]
17 impl<'r> Trait<'r> for B {
method(&self)18     async fn method(&self) { }
19 }
20 
21 #[async_trait]
22 pub trait Trait2 {
method<'r>(&'r self)23     async fn method<'r>(&'r self);
24 }
25 
26 #[async_trait]
27 impl Trait2 for A {
method(&self)28     async fn method(&self) { }
29 }
30 
31 #[async_trait]
32 impl<'r> Trait2<'r> for B {
method(&'r self)33     async fn method(&'r self) { }
34 }
35 
main()36 fn main() {}
37