From 14cb96ec0e6be3b99bfe4ea373c058dcbd2a4f79 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 19:54:16 +0200 Subject: Allign RecordPat with RecordExpr --- crates/ra_ide_db/src/defs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_db/src') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index df56f2d9e..6bf80a34c 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -131,7 +131,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option ast::BindPat(it) => { let local = sema.to_def(&it)?; - if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordFieldPat::cast) { + if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordPatField::cast) { if record_field_pat.name_ref().is_none() { if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { let field = Definition::Field(field); @@ -247,7 +247,7 @@ pub fn classify_name_ref( } } - if let Some(record_field_pat) = ast::RecordFieldPat::cast(parent.clone()) { + if let Some(record_field_pat) = ast::RecordPatField::cast(parent.clone()) { if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { let field = Definition::Field(field); return Some(NameRefClass::Definition(field)); -- cgit v1.2.3