From ff9c5bef7b198cde4358610c565cd0b6dc466de5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 25 Jan 2019 01:32:47 +0300 Subject: ModuleDef is Def-free --- crates/ra_ide_api/src/completion/completion_item.rs | 1 - crates/ra_ide_api/src/navigation_target.rs | 1 - 2 files changed, 2 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index 4e679281c..3ba6c33ee 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -227,7 +227,6 @@ impl Builder { hir::ModuleDef::Static(it) => (CompletionItemKind::Static, it.docs(ctx.db)), hir::ModuleDef::Trait(it) => (CompletionItemKind::Trait, it.docs(ctx.db)), hir::ModuleDef::Type(it) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), - hir::ModuleDef::Def(_) => return self, }; self.kind = Some(kind); self.documentation = docs; diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index 2e11d2de3..c5be8e01b 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs @@ -107,7 +107,6 @@ impl NavigationTarget { module_def: hir::ModuleDef, ) -> Option { match module_def { - hir::ModuleDef::Def(_) => return None, hir::ModuleDef::Module(module) => Some(NavigationTarget::from_module(db, module)), hir::ModuleDef::Function(func) => Some(NavigationTarget::from_function(db, func)), hir::ModuleDef::Struct(s) => { -- cgit v1.2.3