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/visit.rs | |
| parent | 0ff9872b2280009f094af0df3dcdc542cc46a5fd (diff) | |
Support parentheses in patterns under feature gate
Improve recovery for trailing comma after `..`
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 640f90ecb4a..5a24c61cb5a 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -425,7 +425,8 @@ pub fn walk_pat<'a, V: Visitor<'a>>(visitor: &mut V, pattern: &'a Pat) { walk_list!(visitor, visit_pat, tuple_elements); } PatKind::Box(ref subpattern) | - PatKind::Ref(ref subpattern, _) => { + PatKind::Ref(ref subpattern, _) | + PatKind::Paren(ref subpattern) => { visitor.visit_pat(subpattern) } PatKind::Ident(_, ref pth1, ref optional_subpattern) => { |
