mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
use Source for MacroDef
This commit is contained in:
parent
a6e339e822
commit
8b94b429e5
4 changed files with 18 additions and 13 deletions
|
@ -98,8 +98,8 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
|
|||
match classify_name_ref(db, &analyzer, name_ref) {
|
||||
Some(Method(it)) => res.extend(from_def_source(db, it)),
|
||||
Some(Macro(it)) => {
|
||||
let it = it.source(db).1;
|
||||
res.extend(hover_text(it.doc_comment_text(), None));
|
||||
let src = it.source(db);
|
||||
res.extend(hover_text(src.ast.doc_comment_text(), None));
|
||||
}
|
||||
Some(FieldAccess(it)) => {
|
||||
let it = it.source(db).1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue