Skip to content

Commit 8b683c9

Browse files
committed
Add regression test for issue 11
1 parent 5ba252c commit 8b683c9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,21 @@ mod issue9 {
158158
async fn f(_x: Self) {}
159159
}
160160
}
161+
162+
// https://github.com/dtolnay/async-trait/issues/11
163+
mod issue11 {
164+
use async_trait::async_trait;
165+
use std::sync::Arc;
166+
167+
#[async_trait]
168+
trait Issue11 {
169+
async fn example(self: Arc<Self>);
170+
}
171+
172+
struct Struct;
173+
174+
#[async_trait]
175+
impl Issue11 for Struct {
176+
async fn example(self: Arc<Self>) {}
177+
}
178+
}

0 commit comments

Comments
 (0)