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

Preserve struct field pattern shorthand in the prettyprinter. #18362

Merged
merged 1 commit into from
Oct 28, 2014

Conversation

kevinmehall
Copy link
Contributor

Use the is_shorthand field introduced by #17813 (ead6c4b) to make the prettyprinter output the shorthand form. Fixes a few places that set is_shorthand: true when the pattern is not a PatIdent with the same name as the field.

This fixes incorrect non_shorthand_field_patterns warnings when the shorthand is used in a quasiquote, e.g. in rust-peg.

Use the `is_shorthand` field introduced by rust-lang#17813 (ead6c4b) to make the
prettyprinter output the shorthand form. Fixes a few places that set
`is_shorthand: true` when the pattern is not a PatIdent with the same
name as the field.
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Oct 27, 2014
@bors bors merged commit e5f7090 into rust-lang:master Oct 28, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 29, 2024
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.

3 participants