Skip to content

Rust does not allow trailing commas in a fn signature #6506

Closed
@Kimundi

Description

@Kimundi

I think this can be considered a bug, seeing how trailing commas generally are allowed at other places:

foo.rs:5:33: 5:34 error: unexpected token: `)`
foo.rs:5          fn foo(a: uint, b: uint,) -> uint { a + b }
                                          ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-grammarArea: The grammar of RustA-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions