Andrew Walbran | d1b91c7 | 2020-08-11 17:12:08 +0100 | [diff] [blame^] | 1 | #![deny(unused_must_use)] |
2 | |||||
3 | use async_trait::async_trait; | ||||
4 | |||||
5 | #[async_trait] | ||||
6 | trait Interface { | ||||
7 | async fn f(&self); | ||||
8 | } | ||||
9 | |||||
10 | struct Thing; | ||||
11 | |||||
12 | #[async_trait] | ||||
13 | impl Interface for Thing { | ||||
14 | async fn f(&self) {} | ||||
15 | } | ||||
16 | |||||
17 | pub async fn f() { | ||||
18 | Thing.f(); | ||||
19 | } | ||||
20 | |||||
21 | fn main() {} |