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

async fn inside fn fails to parse #51933

Open
cramertj opened this Issue Jun 30, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@cramertj
Copy link
Member

cramertj commented Jun 30, 2018

This fails to parse: fn foo() { async fn bar() { } }.

@cramertj cramertj self-assigned this Jun 30, 2018

@memoryruins

This comment has been minimized.

Copy link
Contributor

memoryruins commented Jun 30, 2018

Other variants:

async fn foo() { async fn bar() {} }
let inside_closure = || { async fn bar() {} };
let async_closure = async || {};
@memoryruins

This comment has been minimized.

Copy link
Contributor

memoryruins commented Jun 30, 2018

All of these examples, including your original example, parse without an issue with the new 2018 edition option enabled on the playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment