Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing comma in method definition doesn't parse #15887

Closed
retep998 opened this issue Jul 22, 2014 · 0 comments · Fixed by #16646
Closed

Trailing comma in method definition doesn't parse #15887

retep998 opened this issue Jul 22, 2014 · 0 comments · Fixed by #16646
Assignees
Labels
A-grammar Area: The grammar of Rust A-parser Area: The parsing of Rust source code to an AST

Comments

@retep998
Copy link
Member

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.

@emberian emberian self-assigned this Jul 22, 2014
ftxqxd added a commit to ftxqxd/rust that referenced this issue Aug 22, 2014
This lets the parser understand trailing commas in method calls, method
definitions, enum variants, and type parameters.

Closes rust-lang#14240.
Closes rust-lang#15887.
bors added a commit that referenced this issue Aug 24, 2014
This lets the parser understand trailing commas in method calls, method definitions, enum variants, and type parameters.

Closes #14240.
Closes #15887.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants