aboutsummaryrefslogtreecommitdiff
path: root/tests/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.rs')
-rw-r--r--tests/test.rs21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/test.rs b/tests/test.rs
index 6f95576..348f3f9 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,12 +1,14 @@
#![cfg_attr(
async_trait_nightly_testing,
- feature(min_specialization, min_type_alias_impl_trait)
+ feature(min_specialization, type_alias_impl_trait)
)]
#![allow(
clippy::let_underscore_drop,
clippy::let_unit_value,
clippy::missing_panics_doc,
- clippy::trivially_copy_pass_by_ref
+ clippy::needless_return,
+ clippy::trivially_copy_pass_by_ref,
+ clippy::unused_async
)]
use async_trait::async_trait;
@@ -1331,7 +1333,7 @@ pub mod issue158 {
#[async_trait]
pub trait Trait {
async fn f(&self) {
- self::f()
+ self::f();
}
}
}
@@ -1361,3 +1363,16 @@ pub mod issue161 {
}
}
}
+
+// https://github.com/dtolnay/async-trait/issues/169
+#[deny(where_clauses_object_safety)]
+pub mod issue169 {
+ use async_trait::async_trait;
+
+ #[async_trait]
+ pub trait Trait: ::core::marker::Sync {
+ async fn f(&self) {}
+ }
+
+ pub fn test(_t: &dyn Trait) {}
+}