From 4af417a78a1684e2c75b275ee3a0db8049ef8b0f Mon Sep 17 00:00:00 2001 From: Henry Boisdequin <65845077+henryboisdequin@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:43:39 +0530 Subject: add suggestion to use the `async_recursion` crate --- compiler/rustc_typeck/src/check/check.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler') diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs index ab3c26fac83..f0bc31641b4 100644 --- a/compiler/rustc_typeck/src/check/check.rs +++ b/compiler/rustc_typeck/src/check/check.rs @@ -1446,6 +1446,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(); } -- cgit 1.4.1-3-g733a5