diff options
Diffstat (limited to 'crates/ra_hir/src/semantics/source_to_def.rs')
-rw-r--r-- | crates/ra_hir/src/semantics/source_to_def.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 | }; |