mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
refactor name_ref_kind.rs
This commit is contained in:
parent
11577288c2
commit
d6ae1b5f0f
6 changed files with 61 additions and 64 deletions
|
@ -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))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue