Skip to content

async fn inside fn fails to parse #51933

Closed

Description

@cramertj

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

Activity

  1. self-assigned this
    on Jun 30, 2018
  2. memoryruins commented on Jun 30, 2018

    @memoryruins
    Contributor

    Other variants:

    async fn foo() { async fn bar() {} }
    let inside_closure = || { async fn bar() {} };
    let async_closure = async || {};
  3. memoryruins commented on Jun 30, 2018

    @memoryruins
    Contributor

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

  4. added
    A-parserArea: The lexing & parsing of Rust source code to an AST
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Jan 27, 2019
  5. nikomatsakis commented on Feb 22, 2019

    @nikomatsakis
    Contributor

    Closing as duplicate of #58652

  6. added
    AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.
    on Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-parserArea: The lexing & parsing of Rust source code to an ASTAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions