diff options
Diffstat (limited to 'third_party/rust/async-trait/tests/ui/bare-trait-object.rs')
-rw-r--r-- | third_party/rust/async-trait/tests/ui/bare-trait-object.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/rust/async-trait/tests/ui/bare-trait-object.rs b/third_party/rust/async-trait/tests/ui/bare-trait-object.rs new file mode 100644 index 0000000000..afcd6b44c3 --- /dev/null +++ b/third_party/rust/async-trait/tests/ui/bare-trait-object.rs @@ -0,0 +1,15 @@ +#![deny(bare_trait_objects)] + +use async_trait::async_trait; + +#[async_trait] +trait Trait { + async fn f(&self); +} + +#[async_trait] +impl Trait for Send + Sync { + async fn f(&self) {} +} + +fn main() {} |