mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
13 lines
187 B
Rust
13 lines
187 B
Rust
//@ edition: 2021
|
|
|
|
trait Foo {
|
|
async fn bar(&self);
|
|
}
|
|
|
|
async fn takes_dyn_trait(x: &dyn Foo) {
|
|
//~^ ERROR the trait `Foo` is not dyn compatible
|
|
x.bar().await;
|
|
}
|
|
|
|
fn main() {}
|