refactor name_ref_kind.rs

This commit is contained in:
Ekaterina Babshukova 2019-09-21 19:35:39 +03:00
parent 11577288c2
commit d6ae1b5f0f
6 changed files with 61 additions and 64 deletions

View file

@ -14,7 +14,7 @@ use crate::{
description_from_symbol, docs_from_symbol, macro_label, rust_code_markup,
rust_code_markup_with_doc, ShortLabel,
},
name_ref_kind::{classify_name_ref, NameKind::*},
name_kind::{classify_name_ref, NameKind::*},
FilePosition, FileRange, RangeInfo,
};
@ -104,7 +104,6 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
let mut no_fallback = false;
match classify_name_ref(db, &analyzer, &name_ref) {
Some(Method(it)) => res.extend(from_def_source(db, it)),
Some(Macro(it)) => {
let src = it.source(db);
res.extend(hover_text(src.ast.doc_comment_text(), Some(macro_label(&src.ast))));