diff options
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 170278904..316f43c1b 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -102,8 +102,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
102 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, name_ref.syntax(), None); | 102 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, name_ref.syntax(), None); |
103 | 103 | ||
104 | let mut no_fallback = false; | 104 | let mut no_fallback = false; |
105 | 105 | let name_kind = classify_name_ref(db, position.file_id, &analyzer, &name_ref) | |
106 | match classify_name_ref(db, &analyzer, &name_ref) { | 106 | .and_then(|d| Some(d.item)); |
107 | match name_kind { | ||
107 | Some(Macro(it)) => { | 108 | Some(Macro(it)) => { |
108 | let src = it.source(db); | 109 | let src = it.source(db); |
109 | res.extend(hover_text(src.ast.doc_comment_text(), Some(macro_label(&src.ast)))); | 110 | res.extend(hover_text(src.ast.doc_comment_text(), Some(macro_label(&src.ast)))); |