Upgrade rust/crates/async-trait to 0.1.40
Test: make
Change-Id: Ifae614e646fac929455de2cb4639578ae954a7f9
diff --git a/tests/test.rs b/tests/test.rs
index 4ecab07..2d8b75b 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -883,8 +883,37 @@
}
}
+// https://github.com/dtolnay/async-trait/issues/92#issuecomment-683370136
+pub mod issue92_2 {
+ use async_trait::async_trait;
+
+ macro_rules! mac {
+ ($($tt:tt)*) => {
+ $($tt)*
+ };
+ }
+
+ pub trait Trait1 {
+ fn func1();
+ }
+
+ #[async_trait]
+ pub trait Trait2: Trait1 {
+ async fn func2() {
+ mac!(Self::func1());
+
+ macro_rules! mac2 {
+ ($($tt:tt)*) => {
+ Self::func1();
+ };
+ }
+ mac2!();
+ }
+ }
+}
+
// https://github.com/dtolnay/async-trait/issues/104
-mod issue104 {
+pub mod issue104 {
use async_trait::async_trait;
#[async_trait]
@@ -909,7 +938,7 @@
}
// https://github.com/dtolnay/async-trait/issues/106
-mod issue106 {
+pub mod issue106 {
use async_trait::async_trait;
use std::future::Future;
@@ -941,7 +970,7 @@
}
// https://github.com/dtolnay/async-trait/issues/110
-mod issue110 {
+pub mod issue110 {
#![deny(clippy::all)]
use async_trait::async_trait;
@@ -963,7 +992,7 @@
}
// https://github.com/dtolnay/async-trait/issues/120
-mod issue120 {
+pub mod issue120 {
#![deny(clippy::trivially_copy_pass_by_ref)]
use async_trait::async_trait;
@@ -978,3 +1007,21 @@
async fn f(&self) {}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/123
+pub mod issue123 {
+ use async_trait::async_trait;
+
+ #[async_trait]
+ trait Trait<T = ()> {
+ async fn f(&self) -> &str
+ where
+ T: 'async_trait,
+ {
+ "default"
+ }
+ }
+
+ #[async_trait]
+ impl<T> Trait<T> for () {}
+}