diff options
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<'_> { | |||
826 | Pat::Missing | 826 | Pat::Missing |
827 | } | 827 | } |
828 | } | 828 | } |
829 | ast::Pat::DotDotPat(_) => { | 829 | ast::Pat::RestPat(_) => { |
830 | // `DotDotPat` requires special handling and should not be mapped | 830 | // `DotDotPat` requires special handling and should not be mapped |
831 | // to a Pat. Here we are using `Pat::Missing` as a fallback for | 831 | // to a Pat. Here we are using `Pat::Missing` as a fallback for |
832 | // when `DotDotPat` is mapped to `Pat`, which can easily happen | 832 | // when `DotDotPat` is mapped to `Pat`, which can easily happen |
@@ -853,10 +853,10 @@ impl ExprCollector<'_> { | |||
853 | fn collect_tuple_pat(&mut self, args: AstChildren<ast::Pat>) -> (Vec<PatId>, Option<usize>) { | 853 | fn collect_tuple_pat(&mut self, args: AstChildren<ast::Pat>) -> (Vec<PatId>, Option<usize>) { |
854 | // Find the location of the `..`, if there is one. Note that we do not | 854 | // Find the location of the `..`, if there is one. Note that we do not |
855 | // consider the possiblity of there being multiple `..` here. | 855 | // consider the possiblity of there being multiple `..` here. |
856 | let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::DotDotPat(_))); | 856 | let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::RestPat(_))); |
857 | // We want to skip the `..` pattern here, since we account for it above. | 857 | // We want to skip the `..` pattern here, since we account for it above. |
858 | let args = args | 858 | let args = args |
859 | .filter(|p| !matches!(p, ast::Pat::DotDotPat(_))) | 859 | .filter(|p| !matches!(p, ast::Pat::RestPat(_))) |
860 | .map(|p| self.collect_pat(p)) | 860 | .map(|p| self.collect_pat(p)) |
861 | .collect(); | 861 | .collect(); |
862 | 862 | ||