aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 15:49:13 +0100
committerAleksey Kladov <[email protected]>2020-07-30 15:49:13 +0100
commit0a9e3ccc262fbcbd4cdaab30384f8cb71584544b (patch)
treec320545ea73f6231ab9a199f7c402f1b77d461a8 /crates/ra_hir
parent6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (diff)
Rename FieldDef -> Field
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs4
-rw-r--r--crates/ra_hir/src/semantics.rs4
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs10
3 files changed, 6 insertions, 12 deletions
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 {
361 361
362#[derive(Debug, PartialEq, Eq)] 362#[derive(Debug, PartialEq, Eq)]
363pub enum FieldSource { 363pub enum FieldSource {
364 Named(ast::RecordFieldDef), 364 Named(ast::RecordField),
365 Pos(ast::TupleFieldDef), 365 Pos(ast::TupleField),
366} 366}
367 367
368impl Field { 368impl 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![
589 (crate::Const, ast::ConstDef, const_to_def), 589 (crate::Const, ast::ConstDef, const_to_def),
590 (crate::Static, ast::StaticDef, static_to_def), 590 (crate::Static, ast::StaticDef, static_to_def),
591 (crate::Function, ast::Fn, fn_to_def), 591 (crate::Function, ast::Fn, fn_to_def),
592 (crate::Field, ast::RecordFieldDef, record_field_to_def), 592 (crate::Field, ast::RecordField, record_field_to_def),
593 (crate::Field, ast::TupleFieldDef, tuple_field_to_def), 593 (crate::Field, ast::TupleField, tuple_field_to_def),
594 (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), 594 (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def),
595 (crate::TypeParam, ast::TypeParam, type_param_to_def), 595 (crate::TypeParam, ast::TypeParam, type_param_to_def),
596 (crate::MacroDef, ast::MacroCall, macro_call_to_def), // this one is dubious, not all calls are macros 596 (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<'_, '_> {
92 pub(super) fn type_alias_to_def(&mut self, src: InFile<ast::TypeAlias>) -> Option<TypeAliasId> { 92 pub(super) fn type_alias_to_def(&mut self, src: InFile<ast::TypeAlias>) -> Option<TypeAliasId> {
93 self.to_def(src, keys::TYPE_ALIAS) 93 self.to_def(src, keys::TYPE_ALIAS)
94 } 94 }
95 pub(super) fn record_field_to_def( 95 pub(super) fn record_field_to_def(&mut self, src: InFile<ast::RecordField>) -> Option<FieldId> {
96 &mut self,
97 src: InFile<ast::RecordFieldDef>,
98 ) -> Option<FieldId> {
99 self.to_def(src, keys::RECORD_FIELD) 96 self.to_def(src, keys::RECORD_FIELD)
100 } 97 }
101 pub(super) fn tuple_field_to_def( 98 pub(super) fn tuple_field_to_def(&mut self, src: InFile<ast::TupleField>) -> Option<FieldId> {
102 &mut self,
103 src: InFile<ast::TupleFieldDef>,
104 ) -> Option<FieldId> {
105 self.to_def(src, keys::TUPLE_FIELD) 99 self.to_def(src, keys::TUPLE_FIELD)
106 } 100 }
107 pub(super) fn enum_variant_to_def( 101 pub(super) fn enum_variant_to_def(