about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-async-fn-in-dyn-trait.rs
blob: 50e5fd1ab7a858daf49ceb2cde28a5767e0e47b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ 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() {}