aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorZac Pullar-Strecker <[email protected]>2020-06-30 10:37:42 +0100
committerZac Pullar-Strecker <[email protected]>2020-06-30 10:42:44 +0100
commitd6f9e8806a26c5998a691974ba8e3655a2186766 (patch)
treeb25b2a853e08a52c443dc25ddbe1aa55e146a6a5 /crates/ra_hir/src
parentdc32f756e0958368648ac151aab1bde40102a506 (diff)
Remove unintentional changes
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 839eb475e..56b2481e6 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -186,17 +186,18 @@ impl ModuleDef {
186 module.visibility_of(db, self) 186 module.visibility_of(db, self)
187 } 187 }
188 188
189 pub fn name(&self, db: &dyn HirDatabase) -> Option<Name> { 189 pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
190 match self { 190 match self {
191 ModuleDef::Module(m) => m.name(db), 191 ModuleDef::Adt(it) => Some(it.name(db)),
192 ModuleDef::Function(m) => Some(m.name(db)), 192 ModuleDef::Trait(it) => Some(it.name(db)),
193 ModuleDef::Adt(m) => Some(m.name(db)), 193 ModuleDef::Function(it) => Some(it.name(db)),
194 ModuleDef::EnumVariant(m) => Some(m.name(db)), 194 ModuleDef::EnumVariant(it) => Some(it.name(db)),
195 ModuleDef::Const(m) => m.name(db), 195 ModuleDef::TypeAlias(it) => Some(it.name(db)),
196 ModuleDef::Static(m) => m.name(db), 196 ModuleDef::Module(it) => it.name(db),
197 ModuleDef::Trait(m) => Some(m.name(db)), 197 ModuleDef::Const(it) => it.name(db),
198 ModuleDef::TypeAlias(m) => Some(m.name(db)), 198 ModuleDef::Static(it) => it.name(db),
199 ModuleDef::BuiltinType(m) => Some(m.as_name()), 199
200 ModuleDef::BuiltinType(it) => Some(it.as_name()),
200 } 201 }
201 } 202 }
202 203