]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/recursive-async-impl-trait-type.rs
Rollup merge of #107022 - scottmcm:ordering-option-eq, r=m-ou-se
[rust.git] / tests / ui / async-await / recursive-async-impl-trait-type.rs
1 // revisions: no_drop_tracking drop_tracking drop_tracking_mir
2 // [drop_tracking] compile-flags: -Zdrop-tracking
3 // [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
4 // edition:2018
5 // Test that impl trait does not allow creating recursive types that are
6 // otherwise forbidden when using `async` and `await`.
7
8 async fn recursive_async_function() -> () {
9     //~^ ERROR recursion in an `async fn` requires boxing
10     recursive_async_function().await;
11 }
12
13 fn main() {}