aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-12-20 07:05:24 +0000
committerAleksey Kladov <[email protected]>2020-12-20 07:05:24 +0000
commitf6ed16674c461cb20c39e787fffab2269b9629b0 (patch)
tree6cc2943b901f35ea3c351490f15cad9061a69c15 /crates/ide_db/src
parent87886e89867d36c14812e70505c4db61a6b66bf0 (diff)
Align code_model name with ungrammar
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r--crates/ide_db/src/defs.rs4
-rw-r--r--crates/ide_db/src/search.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs
index bd2afc887..9d7dce1d4 100644
--- a/crates/ide_db/src/defs.rs
+++ b/crates/ide_db/src/defs.rs
@@ -66,7 +66,7 @@ impl Definition {
66 hir::Adt::Union(it) => it.name(db), 66 hir::Adt::Union(it) => it.name(db),
67 hir::Adt::Enum(it) => it.name(db), 67 hir::Adt::Enum(it) => it.name(db),
68 }, 68 },
69 hir::ModuleDef::EnumVariant(it) => it.name(db), 69 hir::ModuleDef::Variant(it) => it.name(db),
70 hir::ModuleDef::Const(it) => it.name(db)?, 70 hir::ModuleDef::Const(it) => it.name(db)?,
71 hir::ModuleDef::Static(it) => it.name(db)?, 71 hir::ModuleDef::Static(it) => it.name(db)?,
72 hir::ModuleDef::Trait(it) => it.name(db), 72 hir::ModuleDef::Trait(it) => it.name(db),
@@ -207,7 +207,7 @@ impl NameClass {
207 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 207 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
208 }, 208 },
209 ast::Variant(it) => { 209 ast::Variant(it) => {
210 let def: hir::EnumVariant = sema.to_def(&it)?; 210 let def: hir::Variant = sema.to_def(&it)?;
211 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 211 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
212 }, 212 },
213 ast::Fn(it) => { 213 ast::Fn(it) => {
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs
index 525c8a41f..ff10f71c3 100644
--- a/crates/ide_db/src/search.rs
+++ b/crates/ide_db/src/search.rs
@@ -141,7 +141,7 @@ impl Definition {
141 hir::GenericDef::Trait(it) => it.source(db).value.syntax().text_range(), 141 hir::GenericDef::Trait(it) => it.source(db).value.syntax().text_range(),
142 hir::GenericDef::TypeAlias(it) => it.source(db).value.syntax().text_range(), 142 hir::GenericDef::TypeAlias(it) => it.source(db).value.syntax().text_range(),
143 hir::GenericDef::Impl(it) => it.source(db).value.syntax().text_range(), 143 hir::GenericDef::Impl(it) => it.source(db).value.syntax().text_range(),
144 hir::GenericDef::EnumVariant(it) => it.source(db).value.syntax().text_range(), 144 hir::GenericDef::Variant(it) => it.source(db).value.syntax().text_range(),
145 hir::GenericDef::Const(it) => it.source(db).value.syntax().text_range(), 145 hir::GenericDef::Const(it) => it.source(db).value.syntax().text_range(),
146 }; 146 };
147 let mut res = FxHashMap::default(); 147 let mut res = FxHashMap::default();