diff options
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 80445761c..ee0f2dde8 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -144,12 +144,12 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
144 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 144 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) |
145 | } | 145 | } |
146 | hir::ModuleDef::Enum(it) => { | 146 | hir::ModuleDef::Enum(it) => { |
147 | let it = it.source(db).1; | 147 | let src = it.source(db); |
148 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 148 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
149 | } | 149 | } |
150 | hir::ModuleDef::EnumVariant(it) => { | 150 | hir::ModuleDef::EnumVariant(it) => { |
151 | let it = it.source(db).1; | 151 | let src = it.source(db); |
152 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 152 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
153 | } | 153 | } |
154 | hir::ModuleDef::Const(it) => { | 154 | hir::ModuleDef::Const(it) => { |
155 | let it = it.source(db).1; | 155 | let it = it.source(db).1; |
@@ -187,8 +187,11 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
187 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 187 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) |
188 | } | 188 | } |
189 | hir::AdtDef::Enum(it) => { | 189 | hir::AdtDef::Enum(it) => { |
190 | let it = it.source(db).1; | 190 | let src = it.source(db); |
191 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 191 | res.extend(hover_text( |
192 | src.ast.doc_comment_text(), | ||
193 | src.ast.short_label(), | ||
194 | )) | ||
192 | } | 195 | } |
193 | } | 196 | } |
194 | } | 197 | } |