aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 16:52:53 +0100
committerAleksey Kladov <[email protected]>2020-07-30 16:52:53 +0100
commit609680ef97dbf82c07b6b06e21aa366423892304 (patch)
tree34296539101d8db4a484c472a45a1e30503791ef /crates/ra_hir
parent216a5344c8ef3c3e430d2761dc8b1a7b60250a15 (diff)
Rename EnumDef -> Enum
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/has_source.rs4
-rw-r--r--crates/ra_hir/src/semantics.rs2
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs6
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 811a12e00..88399f724 100644
--- a/crates/ra_hir/src/has_source.rs
+++ b/crates/ra_hir/src/has_source.rs
@@ -69,8 +69,8 @@ impl HasSource for Union {
69 } 69 }
70} 70}
71impl HasSource for Enum { 71impl HasSource for Enum {
72 type Ast = ast::EnumDef; 72 type Ast = ast::Enum;
73 fn source(self, db: &dyn HirDatabase) -> InFile<ast::EnumDef> { 73 fn source(self, db: &dyn HirDatabase) -> InFile<ast::Enum> {
74 self.id.lookup(db.upcast()).source(db.upcast()) 74 self.id.lookup(db.upcast()).source(db.upcast())
75 } 75 }
76} 76}
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index 7df018b05..f8e70fe27 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -581,7 +581,7 @@ macro_rules! to_def_impls {
581to_def_impls![ 581to_def_impls![
582 (crate::Module, ast::Module, module_to_def), 582 (crate::Module, ast::Module, module_to_def),
583 (crate::Struct, ast::Struct, struct_to_def), 583 (crate::Struct, ast::Struct, struct_to_def),
584 (crate::Enum, ast::EnumDef, 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::TraitDef, trait_to_def), 586 (crate::Trait, ast::TraitDef, trait_to_def),
587 (crate::ImplDef, ast::ImplDef, impl_to_def), 587 (crate::ImplDef, ast::ImplDef, impl_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 75b773352..9f81b952f 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -77,7 +77,7 @@ impl SourceToDefCtx<'_, '_> {
77 pub(super) fn struct_to_def(&mut self, src: InFile<ast::Struct>) -> Option<StructId> { 77 pub(super) fn struct_to_def(&mut self, src: InFile<ast::Struct>) -> Option<StructId> {
78 self.to_def(src, keys::STRUCT) 78 self.to_def(src, keys::STRUCT)
79 } 79 }
80 pub(super) fn enum_to_def(&mut self, src: InFile<ast::EnumDef>) -> Option<EnumId> { 80 pub(super) fn enum_to_def(&mut self, src: InFile<ast::Enum>) -> Option<EnumId> {
81 self.to_def(src, keys::ENUM) 81 self.to_def(src, keys::ENUM)
82 } 82 }
83 pub(super) fn union_to_def(&mut self, src: InFile<ast::Union>) -> Option<UnionId> { 83 pub(super) fn union_to_def(&mut self, src: InFile<ast::Union>) -> Option<UnionId> {
@@ -170,7 +170,7 @@ impl SourceToDefCtx<'_, '_> {
170 let def = self.struct_to_def(container.with_value(it))?; 170 let def = self.struct_to_def(container.with_value(it))?;
171 VariantId::from(def).into() 171 VariantId::from(def).into()
172 }, 172 },
173 ast::EnumDef(it) => { 173 ast::Enum(it) => {
174 let def = self.enum_to_def(container.with_value(it))?; 174 let def = self.enum_to_def(container.with_value(it))?;
175 def.into() 175 def.into()
176 }, 176 },
@@ -206,7 +206,7 @@ impl SourceToDefCtx<'_, '_> {
206 match (container.value) { 206 match (container.value) {
207 ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(), 207 ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(),
208 ast::Struct(it) => self.struct_to_def(container.with_value(it))?.into(), 208 ast::Struct(it) => self.struct_to_def(container.with_value(it))?.into(),
209 ast::EnumDef(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::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), 210 ast::TraitDef(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::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(),