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
Assignees
Labels
A-async-await Area: Async & Await A-parser Area: The parsing of Rust source code to an AST AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@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
Copy link
Contributor

Other variants:

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

@memoryruins
Copy link
Contributor

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

@jonas-schievink jonas-schievink added A-parser Area: The parsing of Rust source code to an AST T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-async-await Area: Async & Await C-bug Category: This is a bug. labels Jan 27, 2019
@nikomatsakis
Copy link
Contributor

Closing as duplicate of #58652

@nikomatsakis nikomatsakis added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-parser Area: The parsing of Rust source code to an AST AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants