1
Fork 0

Rollup merge of #81926 - henryboisdequin:fix-81907, r=estebank

add suggestion to use the `async_recursion` crate

Closes #81907

CC `@estebank`
This commit is contained in:
Yuki Okushi 2021-02-10 12:24:30 +09:00 committed by GitHub
commit 2e8e591a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -1505,6 +1505,9 @@ fn async_opaque_type_cycle_error(tcx: TyCtxt<'tcx>, span: Span) {
struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing")
.span_label(span, "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",
)
.emit();
}