diff options
Diffstat (limited to 'crates/ra_ide_db/src/defs.rs')
-rw-r--r-- | crates/ra_ide_db/src/defs.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 0599f5e38..030f44f86 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs | |||
@@ -20,8 +20,8 @@ use crate::RootDatabase; | |||
20 | #[derive(Debug, PartialEq, Eq)] | 20 | #[derive(Debug, PartialEq, Eq)] |
21 | pub enum NameKind { | 21 | pub enum NameKind { |
22 | Macro(MacroDef), | 22 | Macro(MacroDef), |
23 | Field(StructField), | 23 | StructField(StructField), |
24 | Def(ModuleDef), | 24 | ModuleDef(ModuleDef), |
25 | SelfType(ImplBlock), | 25 | SelfType(ImplBlock), |
26 | Local(Local), | 26 | Local(Local), |
27 | TypeParam(TypeParam), | 27 | TypeParam(TypeParam), |
@@ -130,7 +130,7 @@ pub fn classify_name( | |||
130 | } | 130 | } |
131 | 131 | ||
132 | pub fn from_struct_field(db: &RootDatabase, field: StructField) -> NameDefinition { | 132 | pub fn from_struct_field(db: &RootDatabase, field: StructField) -> NameDefinition { |
133 | let kind = NameKind::Field(field); | 133 | let kind = NameKind::StructField(field); |
134 | let parent = field.parent_def(db); | 134 | let parent = field.parent_def(db); |
135 | let container = parent.module(db); | 135 | let container = parent.module(db); |
136 | let visibility = match parent { | 136 | let visibility = match parent { |
@@ -146,7 +146,7 @@ pub fn from_module_def( | |||
146 | def: ModuleDef, | 146 | def: ModuleDef, |
147 | module: Option<Module>, | 147 | module: Option<Module>, |
148 | ) -> NameDefinition { | 148 | ) -> NameDefinition { |
149 | let kind = NameKind::Def(def); | 149 | let kind = NameKind::ModuleDef(def); |
150 | let (container, visibility) = match def { | 150 | let (container, visibility) = match def { |
151 | ModuleDef::Module(it) => { | 151 | ModuleDef::Module(it) => { |
152 | let container = it.parent(db).or_else(|| Some(it)).unwrap(); | 152 | let container = it.parent(db).or_else(|| Some(it)).unwrap(); |