Skip to content

Trailing comma in method definition doesn't parse #15887

@retep998

Description

@retep998
fn bar(a: int,) {} struct Foo; impl Foo { fn bar(a: int,) {} //~ error: unexpected token: `)` }

It works for functions—it should also work for methods.
May be related to #14240.

Metadata

Metadata

Assignees

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