From 5b18a4eef9e69260ce2f105b33553c929cb7d827 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 23 Aug 2019 15:55:21 +0300 Subject: rename struct -> record, pos -> tuple --- crates/ra_ide_api/src/name_ref_kind.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide_api/src/name_ref_kind.rs') diff --git a/crates/ra_ide_api/src/name_ref_kind.rs b/crates/ra_ide_api/src/name_ref_kind.rs index f7db6c826..34a8bcc36 100644 --- a/crates/ra_ide_api/src/name_ref_kind.rs +++ b/crates/ra_ide_api/src/name_ref_kind.rs @@ -54,12 +54,12 @@ pub(crate) fn classify_name_ref( } // It could also be a named field - if let Some(field_expr) = name_ref.syntax().parent().and_then(ast::NamedField::cast) { - tested_by!(goto_definition_works_for_named_fields); + if let Some(field_expr) = name_ref.syntax().parent().and_then(ast::RecordField::cast) { + tested_by!(goto_definition_works_for_record_fields); - let struct_lit = field_expr.syntax().ancestors().find_map(ast::StructLit::cast); + let record_lit = field_expr.syntax().ancestors().find_map(ast::RecordLit::cast); - if let Some(ty) = struct_lit.and_then(|lit| analyzer.type_of(db, &lit.into())) { + if let Some(ty) = record_lit.and_then(|lit| analyzer.type_of(db, &lit.into())) { if let Some((hir::AdtDef::Struct(s), _)) = ty.as_adt() { let hir_path = hir::Path::from_name_ref(name_ref); let hir_name = hir_path.as_ident().unwrap(); -- cgit v1.2.3