diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 20:47:23 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 20:47:23 +0100 |
commit | 1914d0aa7b5518c743e7403da6d7eea3fe28e955 (patch) | |
tree | ae48a497fbe6ef49c5b8a9a0431c778953c428a0 /crates/ra_hir_def/src | |
parent | 215b9b9cccd66c9e9413e7581931371daa0c94e5 (diff) | |
parent | 22d295ceaaee76dbd555cdeedc0ed7578e66279d (diff) |
Merge #5633
5633: Rename DotDotPat -> RestPat r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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 | ||