Rename DotDotPat -> RestPat

This commit is contained in:
Aleksey Kladov 2020-07-31 21:45:29 +02:00
parent 215b9b9ccc
commit 22d295ceaa
14 changed files with 55 additions and 55 deletions

View file

@ -293,15 +293,15 @@ impl ast::SlicePat {
let mut args = self.args().peekable();
let prefix = args
.peeking_take_while(|p| match p {
ast::Pat::DotDotPat(_) => false,
ast::Pat::RestPat(_) => false,
ast::Pat::IdentPat(bp) => match bp.pat() {
Some(ast::Pat::DotDotPat(_)) => false,
Some(ast::Pat::RestPat(_)) => false,
_ => true,
},
ast::Pat::RefPat(rp) => match rp.pat() {
Some(ast::Pat::DotDotPat(_)) => false,
Some(ast::Pat::RestPat(_)) => false,
Some(ast::Pat::IdentPat(bp)) => match bp.pat() {
Some(ast::Pat::DotDotPat(_)) => false,
Some(ast::Pat::RestPat(_)) => false,
_ => true,
},
_ => true,