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

Doesn't handle references inside generics (e.g. Option) #34

Closed
puckipedia opened this issue Jan 22, 2024 · 2 comments · Fixed by #38
Closed

Doesn't handle references inside generics (e.g. Option) #34

puckipedia opened this issue Jan 22, 2024 · 2 comments · Fixed by #38

Comments

@puckipedia
Copy link

#[async_recursion::async_recursion]
async fn meow(n : Option<&str>) -> () {
    meow(n).await
}

expands to (cleaned):

#[must_use]
fn meow(
    n: Option<&str>,
) -> Pin<Box<dyn Future<Output = ()> + Send>> {
    Box::pin(async move { meow(n).await })
}
@dcchut
Copy link
Owner

dcchut commented Feb 10, 2024

nice catch - I'll have a look at improving the way lifetimes are extracted from the function's signature.

@dcchut
Copy link
Owner

dcchut commented Mar 17, 2024

Released in v1.1.0.

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 a pull request may close this issue.

2 participants