diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 19:12:38 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 19:12:38 +0100 |
commit | 38ab326aac70484cb951fe9389d788d525d41550 (patch) | |
tree | 0032223efeefca76340fb0a97f6f12d0e432a2a9 /crates/ra_hir/src/source_analyzer.rs | |
parent | 5cade89d730b025082ff2df70aace259951a9ccf (diff) | |
parent | 98181087984157e27faba0b969e384f3c62c39d5 (diff) |
Merge #5631
5631: Finalize pattern grammar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/source_analyzer.rs')
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index f2e630ef1..d0cb62ef0 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs | |||
@@ -182,7 +182,7 @@ impl SourceAnalyzer { | |||
182 | pub(crate) fn resolve_record_field_pat( | 182 | pub(crate) fn resolve_record_field_pat( |
183 | &self, | 183 | &self, |
184 | _db: &dyn HirDatabase, | 184 | _db: &dyn HirDatabase, |
185 | field: &ast::RecordFieldPat, | 185 | field: &ast::RecordPatField, |
186 | ) -> Option<Field> { | 186 | ) -> Option<Field> { |
187 | let pat_id = self.pat_id(&field.pat()?)?; | 187 | let pat_id = self.pat_id(&field.pat()?)?; |
188 | let struct_field = self.infer.as_ref()?.record_field_pat_resolution(pat_id)?; | 188 | let struct_field = self.infer.as_ref()?.record_field_pat_resolution(pat_id)?; |
@@ -202,7 +202,7 @@ impl SourceAnalyzer { | |||
202 | pub(crate) fn resolve_bind_pat_to_const( | 202 | pub(crate) fn resolve_bind_pat_to_const( |
203 | &self, | 203 | &self, |
204 | db: &dyn HirDatabase, | 204 | db: &dyn HirDatabase, |
205 | pat: &ast::BindPat, | 205 | pat: &ast::IdentPat, |
206 | ) -> Option<ModuleDef> { | 206 | ) -> Option<ModuleDef> { |
207 | let pat_id = self.pat_id(&pat.clone().into())?; | 207 | let pat_id = self.pat_id(&pat.clone().into())?; |
208 | let body = self.body.as_ref()?; | 208 | let body = self.body.as_ref()?; |