From 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:49:13 +0200 Subject: Rename FieldDef -> Field --- crates/ra_hir/src/code_model.rs | 4 ++-- crates/ra_hir/src/semantics.rs | 4 ++-- crates/ra_hir/src/semantics/source_to_def.rs | 10 ++-------- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 859bdfb3b..36c0bdc9e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -361,8 +361,8 @@ pub struct Field { #[derive(Debug, PartialEq, Eq)] pub enum FieldSource { - Named(ast::RecordFieldDef), - Pos(ast::TupleFieldDef), + Named(ast::RecordField), + Pos(ast::TupleField), } impl Field { diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index a654c618f..3e9c54a39 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs @@ -589,8 +589,8 @@ to_def_impls![ (crate::Const, ast::ConstDef, const_to_def), (crate::Static, ast::StaticDef, static_to_def), (crate::Function, ast::Fn, fn_to_def), - (crate::Field, ast::RecordFieldDef, record_field_to_def), - (crate::Field, ast::TupleFieldDef, tuple_field_to_def), + (crate::Field, ast::RecordField, record_field_to_def), + (crate::Field, ast::TupleField, tuple_field_to_def), (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), (crate::TypeParam, ast::TypeParam, type_param_to_def), (crate::MacroDef, ast::MacroCall, macro_call_to_def), // this one is dubious, not all calls are macros diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index d23a1974b..4f90f588e 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs @@ -92,16 +92,10 @@ impl SourceToDefCtx<'_, '_> { pub(super) fn type_alias_to_def(&mut self, src: InFile) -> Option { self.to_def(src, keys::TYPE_ALIAS) } - pub(super) fn record_field_to_def( - &mut self, - src: InFile, - ) -> Option { + pub(super) fn record_field_to_def(&mut self, src: InFile) -> Option { self.to_def(src, keys::RECORD_FIELD) } - pub(super) fn tuple_field_to_def( - &mut self, - src: InFile, - ) -> Option { + pub(super) fn tuple_field_to_def(&mut self, src: InFile) -> Option { self.to_def(src, keys::TUPLE_FIELD) } pub(super) fn enum_variant_to_def( -- cgit v1.2.3