rust/tests/ui/async-await/in-trait/async-recursive-generic.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
528 B
Plaintext
Raw Normal View History

error[E0733]: recursion in an `async fn` requires boxing
2023-10-02 16:31:46 -05:00
--> $DIR/async-recursive-generic.rs:11:5
|
LL | async fn foo_recursive(&self, n: usize) -> T {
2023-10-02 16:31:46 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
|
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
error: aborting due to previous error
For more information about this error, try `rustc --explain E0733`.