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

Comments

Projects
None yet
2 participants
@retep998
Copy link
Member

retep998 commented Jul 22, 2014

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.

@cmr cmr self-assigned this Jul 22, 2014

@cmr cmr added A-grammar labels Jul 22, 2014

P1start added a commit to P1start/rust that referenced this issue Aug 21, 2014

Add support for trailing commas in more places
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.

P1start added a commit to P1start/rust that referenced this issue Aug 22, 2014

Add support for trailing commas in more places
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

auto merge of #16646 : P1start/rust/trailing-commas, r=alexcrichton
This lets the parser understand trailing commas in method calls, method definitions, enum variants, and type parameters.

Closes #14240.
Closes #15887.

@bors bors closed this in #16646 Aug 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.