]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/recursive-async-impl-trait-type.rs
Rollup merge of #60897 - seanmonstar:patch-4, r=sfackler
[rust.git] / src / test / ui / async-await / 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, generators)]
6
7 async fn recursive_async_function() -> () { //~ ERROR
8     await!(recursive_async_function());
9 }
10
11 fn main() {}