diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 17:28:28 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 17:28:28 +0100 |
commit | c5798c4d75aa807aec47208a49101bdec3affcca (patch) | |
tree | 1af0efdcee857e1ba91e76f4cc7fd7c043916ebb /crates/ra_hir | |
parent | c83467796b6c7365ea4f41900d74444384a9e618 (diff) |
Finalize impl Grammar
Diffstat (limited to 'crates/ra_hir')
-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 | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs index 057f6e32f..1c691d961 100644 --- a/crates/ra_hir/src/has_source.rs +++ b/crates/ra_hir/src/has_source.rs | |||
@@ -120,8 +120,8 @@ impl HasSource for MacroDef { | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | impl HasSource for ImplDef { | 122 | impl HasSource for ImplDef { |
123 | type Ast = ast::ImplDef; | 123 | type Ast = ast::Impl; |
124 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::ImplDef> { | 124 | fn source(self, db: &dyn HirDatabase) -> InFile<ast::Impl> { |
125 | self.id.lookup(db.upcast()).source(db.upcast()) | 125 | self.id.lookup(db.upcast()).source(db.upcast()) |
126 | } | 126 | } |
127 | } | 127 | } |
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 5f5104dab..6f3b3dc9a 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -584,7 +584,7 @@ to_def_impls![ | |||
584 | (crate::Enum, ast::Enum, enum_to_def), | 584 | (crate::Enum, ast::Enum, enum_to_def), |
585 | (crate::Union, ast::Union, union_to_def), | 585 | (crate::Union, ast::Union, union_to_def), |
586 | (crate::Trait, ast::Trait, trait_to_def), | 586 | (crate::Trait, ast::Trait, trait_to_def), |
587 | (crate::ImplDef, ast::ImplDef, impl_to_def), | 587 | (crate::ImplDef, ast::Impl, impl_to_def), |
588 | (crate::TypeAlias, ast::TypeAlias, type_alias_to_def), | 588 | (crate::TypeAlias, ast::TypeAlias, type_alias_to_def), |
589 | (crate::Const, ast::Const, const_to_def), | 589 | (crate::Const, ast::Const, const_to_def), |
590 | (crate::Static, ast::Static, static_to_def), | 590 | (crate::Static, ast::Static, static_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 ae41d3ddf..d1994e2e7 100644 --- a/crates/ra_hir/src/semantics/source_to_def.rs +++ b/crates/ra_hir/src/semantics/source_to_def.rs | |||
@@ -68,7 +68,7 @@ impl SourceToDefCtx<'_, '_> { | |||
68 | pub(super) fn trait_to_def(&mut self, src: InFile<ast::Trait>) -> Option<TraitId> { | 68 | pub(super) fn trait_to_def(&mut self, src: InFile<ast::Trait>) -> Option<TraitId> { |
69 | self.to_def(src, keys::TRAIT) | 69 | self.to_def(src, keys::TRAIT) |
70 | } | 70 | } |
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::Impl>) -> 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::Fn>) -> Option<FunctionId> { | 74 | pub(super) fn fn_to_def(&mut self, src: InFile<ast::Fn>) -> Option<FunctionId> { |
@@ -158,7 +158,7 @@ impl SourceToDefCtx<'_, '_> { | |||
158 | let def = self.trait_to_def(container.with_value(it))?; | 158 | let def = self.trait_to_def(container.with_value(it))?; |
159 | def.into() | 159 | def.into() |
160 | }, | 160 | }, |
161 | ast::ImplDef(it) => { | 161 | ast::Impl(it) => { |
162 | let def = self.impl_to_def(container.with_value(it))?; | 162 | let def = self.impl_to_def(container.with_value(it))?; |
163 | def.into() | 163 | def.into() |
164 | }, | 164 | }, |
@@ -209,7 +209,7 @@ impl SourceToDefCtx<'_, '_> { | |||
209 | ast::Enum(it) => self.enum_to_def(container.with_value(it))?.into(), | 209 | ast::Enum(it) => self.enum_to_def(container.with_value(it))?.into(), |
210 | ast::Trait(it) => self.trait_to_def(container.with_value(it))?.into(), | 210 | ast::Trait(it) => self.trait_to_def(container.with_value(it))?.into(), |
211 | ast::TypeAlias(it) => self.type_alias_to_def(container.with_value(it))?.into(), | 211 | ast::TypeAlias(it) => self.type_alias_to_def(container.with_value(it))?.into(), |
212 | ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(), | 212 | ast::Impl(it) => self.impl_to_def(container.with_value(it))?.into(), |
213 | _ => continue, | 213 | _ => continue, |
214 | } | 214 | } |
215 | }; | 215 | }; |