summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs
blob: bb2a61f03ce1f46e54d33741741df75762cda59f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// edition:2018
// Test that impl trait does not allow creating recursive types that are
// otherwise forbidden when using `async` and `await`.

async fn rec_1() { //~ ERROR recursion in an `async fn`
    rec_2().await;
}

async fn rec_2() { //~ ERROR recursion in an `async fn`
    rec_1().await;
}

fn main() {}