Skip to content

Async on lambda function break compiling code. #3945

Closed
@jannickj

Description

@jannickj
|x| async {
                 ...
        }

Is formatted into

|x|  {
    async {
                 ...
        }
}

Which then gives the compiler error that x is moved out of context.
Currently the only way to fix it and use the formatter is to write

|x|  {
    async move {
                 ...
        }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.p-high

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions