aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 18:54:16 +0100
committerAleksey Kladov <[email protected]>2020-07-31 19:00:48 +0100
commit14cb96ec0e6be3b99bfe4ea373c058dcbd2a4f79 (patch)
tree730802ad5c2d522bd77eba81984d8e368e852948 /crates/ra_hir/src
parent572f1c08b6ba43bdd57c5cb99f79a08ecd821c1c (diff)
Allign RecordPat with RecordExpr
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/semantics.rs4
-rw-r--r--crates/ra_hir/src/source_analyzer.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index 6f3b3dc9a..44c71857e 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -216,7 +216,7 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
216 self.imp.resolve_record_field(field) 216 self.imp.resolve_record_field(field)
217 } 217 }
218 218
219 pub fn resolve_record_field_pat(&self, field: &ast::RecordFieldPat) -> Option<Field> { 219 pub fn resolve_record_field_pat(&self, field: &ast::RecordPatField) -> Option<Field> {
220 self.imp.resolve_record_field_pat(field) 220 self.imp.resolve_record_field_pat(field)
221 } 221 }
222 222
@@ -429,7 +429,7 @@ impl<'db> SemanticsImpl<'db> {
429 self.analyze(field.syntax()).resolve_record_field(self.db, field) 429 self.analyze(field.syntax()).resolve_record_field(self.db, field)
430 } 430 }
431 431
432 fn resolve_record_field_pat(&self, field: &ast::RecordFieldPat) -> Option<Field> { 432 fn resolve_record_field_pat(&self, field: &ast::RecordPatField) -> Option<Field> {
433 self.analyze(field.syntax()).resolve_record_field_pat(self.db, field) 433 self.analyze(field.syntax()).resolve_record_field_pat(self.db, field)
434 } 434 }
435 435
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs
index f2e630ef1..37b33cc4f 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)?;