]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/recursive-async-impl-trait-type.rs
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / 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() {}