]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/recursive-async-impl-trait-type.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[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 async fn recursive_async_function() -> () {
6     //~^ ERROR recursion in an `async fn` requires boxing
7     recursive_async_function().await;
8 }
9
10 fn main() {}