Upgrade rust/crates/async-trait to 0.1.41
Test: make
Change-Id: I7736a671cc2df3bbaae2ec9478031e83da141a69
diff --git a/tests/test.rs b/tests/test.rs
index 2d8b75b..002fd20 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1025,3 +1025,26 @@
#[async_trait]
impl<T> Trait<T> for () {}
}
+
+// https://github.com/dtolnay/async-trait/issues/129
+pub mod issue129 {
+ #![deny(clippy::pedantic)]
+
+ use async_trait::async_trait;
+
+ #[async_trait]
+ pub trait TestTrait {
+ async fn a(_b: u8, c: u8) -> u8 {
+ c
+ }
+ }
+
+ pub struct TestStruct;
+
+ #[async_trait]
+ impl TestTrait for TestStruct {
+ async fn a(_b: u8, c: u8) -> u8 {
+ c
+ }
+ }
+}
diff --git a/tests/ui/send-not-implemented.stderr b/tests/ui/send-not-implemented.stderr
index 2f288f5..05c445b 100644
--- a/tests/ui/send-not-implemented.stderr
+++ b/tests/ui/send-not-implemented.stderr
@@ -9,14 +9,14 @@
12 | | }
| |_____^ future returned by `__test` is not `Send`
|
- = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::sync::MutexGuard<'_, ()>`
+ = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
note: future is not `Send` as this value is used across an await
--> $DIR/send-not-implemented.rs:11:9
|
10 | let _guard = mutex.lock().unwrap();
- | ------ has type `std::sync::MutexGuard<'_, ()>` which is not `Send`
+ | ------ has type `MutexGuard<'_, ()>` which is not `Send`
11 | f().await;
| ^^^^^^^^^ await occurs here, with `_guard` maybe used later
12 | }
| - `_guard` is later dropped here
- = note: required for the cast to the object type `dyn std::future::Future<Output = ()> + std::marker::Send`
+ = note: required for the cast to the object type `dyn Future<Output = ()> + Send`