Upgrade rust/crates/async-trait to 0.1.38
Change-Id: I894c990c19b1ac3d74e4bf002cf581b9875e730e
diff --git a/tests/test.rs b/tests/test.rs
index 3ea2d15..4ecab07 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -706,6 +706,8 @@
// https://github.com/dtolnay/async-trait/issues/83
pub mod issue83 {
+ #![allow(clippy::needless_arbitrary_self_type)]
+
use async_trait::async_trait;
#[async_trait]
@@ -959,3 +961,20 @@
async fn load(&self, _key: &str) {}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/120
+mod issue120 {
+ #![deny(clippy::trivially_copy_pass_by_ref)]
+
+ use async_trait::async_trait;
+
+ #[async_trait]
+ trait Trait {
+ async fn f(&self);
+ }
+
+ #[async_trait]
+ impl Trait for () {
+ async fn f(&self) {}
+ }
+}
diff --git a/tests/ui/self-span.stderr b/tests/ui/self-span.stderr
index f897c01..fb11528 100644
--- a/tests/ui/self-span.stderr
+++ b/tests/ui/self-span.stderr
@@ -5,7 +5,7 @@
| --------------- `S` defined here
...
18 | let _: Self = Self;
- | ^^^^ did you mean `S { /* fields */ }`?
+ | ^^^^ help: use struct literal syntax instead: `S {}`
error[E0308]: mismatched types
--> $DIR/self-span.rs:17:21