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

Fsk 8468 allow underscore paramname in trait default method #8940

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Sep 3, 2013

Fix #8468. (Though the right answer in the end, as noted on the dialogue on the ticket, might be to just require trait methods to name their parameters, regardless of whether they have a default method implementation or not.)

@@ -347,6 +347,13 @@ impl Drop for Parser {
fn drop(&self) {}
}

fn is_plain_ident_or_underscore(t: &token::Token) -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to write this as is_plan_ident(...) || *t == UNDERSCORE just to reduce the duplication of logic between parse::token and here?

Otherwise r=me

bors added a commit that referenced this pull request Sep 3, 2013
…me-in-trait-default-method, r=alexcrichton

Fix #8468.  (Though the right answer in the end, as noted on the dialogue on the ticket, might be to just require trait methods to name their parameters, regardless of whether they have a default method implementation or not.)
@bors bors closed this Sep 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default methods: parser rejects methods with underscore names for parameters
3 participants