diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-24 15:27:06 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-01 01:47:56 +0300 |
| commit | c9aff92e6dc3ea43228d3d4e24ee7f5485943569 (patch) | |
| tree | 84fe8eb3d8ea997a2fecd31c818ce040a3f741af /src/libsyntax/print/pprust.rs | |
| parent | 0ff9872b2280009f094af0df3dcdc542cc46a5fd (diff) | |
| download | rust-c9aff92e6dc3ea43228d3d4e24ee7f5485943569.tar.gz rust-c9aff92e6dc3ea43228d3d4e24ee7f5485943569.zip | |
Support parentheses in patterns under feature gate
Improve recovery for trailing comma after `..`
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 9cad9f46e98..77afafbb4e0 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -2659,6 +2659,11 @@ impl<'a> State<'a> { |s, p| s.print_pat(p))?; self.s.word("]")?; } + PatKind::Paren(ref inner) => { + self.popen()?; + self.print_pat(inner)?; + self.pclose()?; + } PatKind::Mac(ref m) => self.print_mac(m, token::Paren)?, } self.ann.post(self, NodePat(pat)) |
