]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/mutually-recursive-async-impl-trait-type.rs
Check impl trait substs when checking for recursive types
[rust.git] / src / test / ui / async-await / mutually-recursive-async-impl-trait-type.rs
1 // edition:2018
2 // Test that impl trait does not allow creating recursive types that are
3 // otherwise forbidden when using `async` and `await`.
4
5 async fn rec_1() { //~ ERROR recursion in an `async fn`
6     rec_2().await;
7 }
8
9 async fn rec_2() { //~ ERROR recursion in an `async fn`
10     rec_1().await;
11 }
12
13 fn main() {}