diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 13:51:08 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 14:16:05 +0100 |
commit | 1142112c70b705f59b7d559d9d72cdc831865158 (patch) | |
tree | 1ca467302b268c800da8b26482e90effcea08229 /crates/ra_hir/src | |
parent | 3e1e6227ca525f8631e0bff2215fa3de1b4f4cc1 (diff) |
Rename FnDef -> Fn
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/has_source.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs index 76c32fc17..f32b8cbb9 100644 --- a/crates/ra_hir/src/has_source.rs +++ b/crates/ra_hir/src/has_source.rs | |||
@@ -81,8 +81,8 @@ impl HasSource for EnumVariant { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | impl HasSource for Function { | 83 | impl HasSource for Function { |
84 | type Ast = ast::FnDef; | 84 | type Ast = ast::Fn; |
85 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::FnDef> { | 85 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Fn> { |
86 | self.id.lookup(db.upcast()).source(db.upcast()) | 86 | self.id.lookup(db.upcast()).source(db.upcast()) |
87 | } | 87 | } |
88 | } | 88 | } |
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 1436b1afe..0b634f23e 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -585,7 +585,7 @@ to_def_impls![ | |||
585 | (crate::TypeAlias, ast::TypeAliasDef, type_alias_to_def), | 585 | (crate::TypeAlias, ast::TypeAliasDef, type_alias_to_def), |
586 | (crate::Const, ast::ConstDef, const_to_def), | 586 | (crate::Const, ast::ConstDef, const_to_def), |
587 | (crate::Static, ast::StaticDef, static_to_def), | 587 | (crate::Static, ast::StaticDef, static_to_def), |
588 | (crate::Function, ast::FnDef, fn_to_def), | 588 | (crate::Function, ast::Fn, fn_to_def), |
589 | (crate::Field, ast::RecordFieldDef, record_field_to_def), | 589 | (crate::Field, ast::RecordFieldDef, record_field_to_def), |
590 | (crate::Field, ast::TupleFieldDef, tuple_field_to_def), | 590 | (crate::Field, ast::TupleFieldDef, tuple_field_to_def), |
591 | (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), | 591 | (crate::EnumVariant, ast::EnumVariant, enum_variant_to_def), |
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs index 42e5a1bdb..4118de2e2 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs | |||
@@ -71,7 +71,7 @@ impl SourceToDefCtx<'_, '_> { | |||
71 | pub(super) fn impl_to_def(&mut self, src: InFile<ast::ImplDef>) -> Option<ImplId> { | 71 | pub(super) fn impl_to_def(&mut self, src: InFile<ast::ImplDef>) -> Option<ImplId> { |
72 | self.to_def(src, keys::IMPL) | 72 | self.to_def(src, keys::IMPL) |
73 | } | 73 | } |
74 | pub(super) fn fn_to_def(&mut self, src: InFile<ast::FnDef>) -> Option<FunctionId> { | 74 | pub(super) fn fn_to_def(&mut self, src: InFile<ast::Fn>) -> Option<FunctionId> { |
75 | self.to_def(src, keys::FUNCTION) | 75 | self.to_def(src, keys::FUNCTION) |
76 | } | 76 | } |
77 | pub(super) fn struct_to_def(&mut self, src: InFile<ast::StructDef>) -> Option<StructId> { | 77 | pub(super) fn struct_to_def(&mut self, src: InFile<ast::StructDef>) -> Option<StructId> { |
@@ -171,7 +171,7 @@ impl SourceToDefCtx<'_, '_> { | |||
171 | let def = self.impl_to_def(container.with_value(it))?; | 171 | let def = self.impl_to_def(container.with_value(it))?; |
172 | def.into() | 172 | def.into() |
173 | }, | 173 | }, |
174 | ast::FnDef(it) => { | 174 | ast::Fn(it) => { |
175 | let def = self.fn_to_def(container.with_value(it))?; | 175 | let def = self.fn_to_def(container.with_value(it))?; |
176 | DefWithBodyId::from(def).into() | 176 | DefWithBodyId::from(def).into() |
177 | }, | 177 | }, |
@@ -213,7 +213,7 @@ impl SourceToDefCtx<'_, '_> { | |||
213 | for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { | 213 | for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { |
214 | let res: GenericDefId = match_ast! { | 214 | let res: GenericDefId = match_ast! { |
215 | match (container.value) { | 215 | match (container.value) { |
216 | ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), | 216 | ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(), |
217 | ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), | 217 | ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), |
218 | ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), | 218 | ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), |
219 | ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), | 219 | ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), |
@@ -233,7 +233,7 @@ impl SourceToDefCtx<'_, '_> { | |||
233 | match (container.value) { | 233 | match (container.value) { |
234 | ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(), | 234 | ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(), |
235 | ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(), | 235 | ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(), |
236 | ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), | 236 | ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(), |
237 | _ => continue, | 237 | _ => continue, |
238 | } | 238 | } |
239 | }; | 239 | }; |