Support parentheses in patterns under feature gate

Improve recovery for trailing comma after `..`
This commit is contained in:
Vadim Petrochenkov
2018-02-24 15:27:06 +03:00
parent 0ff9872b22
commit c9aff92e6d
12 changed files with 166 additions and 107 deletions

View File

@@ -1148,6 +1148,7 @@ pub fn noop_fold_pat<T: Folder>(p: P<Pat>, folder: &mut T) -> P<Pat> {
slice.map(|x| folder.fold_pat(x)),
after.move_map(|x| folder.fold_pat(x)))
}
PatKind::Paren(inner) => PatKind::Paren(folder.fold_pat(inner)),
PatKind::Mac(mac) => PatKind::Mac(folder.fold_mac(mac))
},
span: folder.new_span(span)