]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/mutually-recursive-async-impl-trait-type.rs
Rollup merge of #106931 - Ezrashaw:docs-e0208, r=compiler-errors
[rust.git] / tests / 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() {}