Skip to content

Trailing comma in method call doesn’t parse #14240

Closed
@chris-morgan

Description

@chris-morgan
fn main() {
    bar(baz,);
    foo::bar(baz,);
    foo.bar(baz,);  //~ ERROR unexpected token: `)`
}

It works for functions and static methods—it should also work for instance methods.

Metadata

Metadata

Assignees

Labels

A-grammarArea: The grammar of Rust

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions