ModuleDef is Def-free

This commit is contained in:
Aleksey Kladov 2019-01-25 01:32:47 +03:00
parent 0f2f3a21e7
commit ff9c5bef7b
4 changed files with 2 additions and 12 deletions

View file

@ -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;

View file

@ -107,7 +107,6 @@ impl NavigationTarget {
module_def: hir::ModuleDef,
) -> Option<NavigationTarget> {
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) => {