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

async fn inside fn fails to parse #51933

Closed
cramertj opened this issue Jun 30, 2018 · 3 comments
Closed

async fn inside fn fails to parse #51933

cramertj opened this issue Jun 30, 2018 · 3 comments

Comments

@cramertj
Copy link
Member

@cramertj cramertj commented Jun 30, 2018

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

@cramertj cramertj self-assigned this Jun 30, 2018
@memoryruins
Copy link
Contributor

@memoryruins memoryruins commented Jun 30, 2018

Other variants:

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

@memoryruins 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.

@nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Feb 22, 2019

Closing as duplicate of #58652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants