]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/recursive-async-impl-trait-type.rs
Rollup merge of #58680 - varkor:xpy-help-index-error, r=alexcrichton
[rust.git] / src / test / ui / impl-trait / 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 #![feature(await_macro, async_await, futures_api, generators)]
6
7 async fn recursive_async_function() -> () { //~ ERROR
8     await!(recursive_async_function());
9 }
10
11 fn main() {}