-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Correct spans for fields in enum struct arms ... #12854
Conversation
This is a pattern like |
Yes, exactly |
I hate being nitpicky on these things but. Would you mind making the commit title shorter and add a better description? It helps with keeping a good format in the history and prevents GH from doing what it did with this PR. |
let subpat; | ||
if self.token == token::COLON { | ||
|
||
let subpat = if self.token == token::COLON { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use self.eat(token::COLON)
and remove the self.bump()
eat
bumps the token if present
+1 for better description. -1 on shorter title if it requires making it less sensible (good to strive for, but we don't have a hard requirement about it). +1 on a test (might be tricky though). |
Yeah, I would like a test, but as you say it is tricky. It is caught by Rust/DXR's automated tests, which I would love to land someday... |
Travis has a legitimate failure. |
Correct spans for fields in enum struct arms where the field and variable are unified
Fixed the Travis error by reverting the change to use |
...where the field and variable are unified
fix generate_new doc Looks like this got copied from `generate_impl` without adjusting the description.
...where the field and variable are unified