about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorHenry Boisdequin <65845077+henryboisdequin@users.noreply.github.com>2021-02-09 18:43:39 +0530
committerHenry Boisdequin <65845077+henryboisdequin@users.noreply.github.com>2021-02-09 18:43:39 +0530
commit4af417a78a1684e2c75b275ee3a0db8049ef8b0f (patch)
tree875650c7e7361d0c22c841bfdf76ef386e87ee59 /compiler
parent1279b3b9232e4c44112d98f19cfa8846776d1fe8 (diff)
downloadrust-4af417a78a1684e2c75b275ee3a0db8049ef8b0f.tar.gz
rust-4af417a78a1684e2c75b275ee3a0db8049ef8b0f.zip
add suggestion to use the `async_recursion` crate
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/check/check.rs3
1 files changed, 3 insertions, 0 deletions
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();
 }