Skip to content

The type of a closure with a closure as its first argument cannot be written without parentheses #19410

Closed
@ftxqxd

Description

@ftxqxd

The following code:

fn foo(x: ||u8|, u8|) {}

fails to parse, as the parser expects || to be a type of its own. Adding a space in between the |s does not help; one must write |(|u8|), u8| instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions