rust-lang/rust — pull request #18362 by kevinmehall (2014-10-27 07:44:03+00:00)
Title: Preserve struct field pattern shorthand in the prettyprinter.

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](https://github.com/kevinmehall/rust-peg/blob/69227a61f866590d4e849cfcd8f169fdc5ce59cb/src/translate.rs#L214).