File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ use async_trait:: async_trait;
2+
3+ #[ async_trait]
4+ trait Interface {
5+ async fn f ( & self ) ;
6+ async fn g ( & self ) -> ( ) ;
7+ }
8+
9+ struct Thing ;
10+
11+ #[ async_trait]
12+ impl Interface for Thing {
13+ async fn f ( & self ) {
14+ 0
15+ }
16+ async fn g ( & self ) {
17+ 0
18+ }
19+ }
20+
21+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0308]: mismatched types
2+ --> tests/ui/type-mismatch.rs:13:23
3+ |
4+ 13 | async fn f(&self) {
5+ | _______________________^
6+ 14 | | 0
7+ 15 | | }
8+ | |_____^ expected integer, found `()`
9+
10+ error[E0308]: mismatched types
11+ --> tests/ui/type-mismatch.rs:16:23
12+ |
13+ 16 | async fn g(&self) {
14+ | _______________________^
15+ 17 | | 0
16+ 18 | | }
17+ | |_____^ expected integer, found `()`
You can’t perform that action at this time.
0 commit comments