Andrew Walbran | d1b91c7 | 2020-08-11 17:12:08 +0100 | [diff] [blame^] | 1 | use async_trait::async_trait; |
2 | |||||
3 | pub struct S {} | ||||
4 | |||||
5 | pub enum E { | ||||
6 | V {}, | ||||
7 | } | ||||
8 | |||||
9 | #[async_trait] | ||||
10 | pub trait Trait { | ||||
11 | async fn method(self); | ||||
12 | } | ||||
13 | |||||
14 | #[async_trait] | ||||
15 | impl Trait for S { | ||||
16 | async fn method(self) { | ||||
17 | let _: () = self; | ||||
18 | let _: Self = Self; | ||||
19 | } | ||||
20 | } | ||||
21 | |||||
22 | #[async_trait] | ||||
23 | impl Trait for E { | ||||
24 | async fn method(self) { | ||||
25 | let _: () = self; | ||||
26 | let _: Self = Self::V; | ||||
27 | } | ||||
28 | } | ||||
29 | |||||
30 | fn main() {} |