summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/async-trait-fn.rs
blob: 04123badb5383f21353f74d56589d6e94ba61551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// edition:2018

trait T {
    async fn foo() {} //~ ERROR functions in traits cannot be declared `async`
    async fn bar(&self) {} //~ ERROR functions in traits cannot be declared `async`
    async fn baz() { //~ ERROR functions in traits cannot be declared `async`
        // Nested item must not ICE.
        fn a() {}
    }
}

fn main() {}