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 call doesn’t parse #14240

Closed
chris-morgan opened this issue May 16, 2014 · 0 comments · Fixed by #16646
Closed

Trailing comma in method call doesn’t parse #14240

chris-morgan opened this issue May 16, 2014 · 0 comments · Fixed by #16646
Assignees
Labels
A-grammar Area: The grammar of Rust

Comments

@chris-morgan
Copy link
Member

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.

chris-morgan added a commit to chris-morgan/rust that referenced this issue May 16, 2014
@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.
lnicola pushed a commit to lnicola/rust that referenced this issue Mar 13, 2023
Diagnose value breaks in incorrect breakables
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants