From 22d295ceaaee76dbd555cdeedc0ed7578e66279d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 21:45:29 +0200 Subject: Rename DotDotPat -> RestPat --- crates/ra_hir_def/src/body/lower.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 3f210547e..0d0365370 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs @@ -826,7 +826,7 @@ impl ExprCollector<'_> { Pat::Missing } } - ast::Pat::DotDotPat(_) => { + ast::Pat::RestPat(_) => { // `DotDotPat` requires special handling and should not be mapped // to a Pat. Here we are using `Pat::Missing` as a fallback for // when `DotDotPat` is mapped to `Pat`, which can easily happen @@ -853,10 +853,10 @@ impl ExprCollector<'_> { fn collect_tuple_pat(&mut self, args: AstChildren) -> (Vec, Option) { // Find the location of the `..`, if there is one. Note that we do not // consider the possiblity of there being multiple `..` here. - let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::DotDotPat(_))); + let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::RestPat(_))); // We want to skip the `..` pattern here, since we account for it above. let args = args - .filter(|p| !matches!(p, ast::Pat::DotDotPat(_))) + .filter(|p| !matches!(p, ast::Pat::RestPat(_))) .map(|p| self.collect_pat(p)) .collect(); -- cgit v1.2.3