Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Async Recursion Macro to Workarounds #85

Closed
wants to merge 1 commit into from

Conversation

zicklag
Copy link

@zicklag zicklag commented Mar 27, 2020

This may not be something you want in the book, but there is a nifty macro crate for automatically transforming async functions to return boxed futures that could be useful to people.

I noticed the other example was in a separate file, but this is a super small example so I just inlined it. I can change it if you like.

@taiki-e
Copy link
Member

taiki-e commented Jul 30, 2022

I wonder if this is no longer necessary because impl trait recursion was allowed some time ago.

@zicklag
Copy link
Author

zicklag commented Jul 30, 2022

Looks like a simple recursive async function still fails ( playground ).

@taiki-e
Copy link
Member

taiki-e commented Jul 30, 2022

Ah, thanks. And it is impressive that the compiler's diagnosis mentions async_recursion crate.

  = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nrc
Copy link
Member

nrc commented Oct 5, 2024

Given the age of the PR and the conflicts I'm going to close this, sorry it never got merged

@nrc nrc closed this Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants