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