diff options
author | Aleksey Kladov <[email protected]> | 2019-06-11 15:13:20 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-06-11 16:28:51 +0100 |
commit | 46bc8675edd403ffcd8963e4f26447b283e9d09e (patch) | |
tree | a233cc8fe98da533444f90edf929c6ae1e343b22 /crates/ra_ide_api/src/hover.rs | |
parent | 4f94af3c4aaa57ebb4cb01f7e4edfb3a0821b09b (diff) |
use Source for statics and consts
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 4dd3c1b9f..fe108a589 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -115,8 +115,8 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
115 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) | 115 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
116 | } | 116 | } |
117 | hir::ImplItem::Const(it) => { | 117 | hir::ImplItem::Const(it) => { |
118 | let it = it.source(db).1; | 118 | let src = it.source(db); |
119 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 119 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
120 | } | 120 | } |
121 | hir::ImplItem::TypeAlias(it) => { | 121 | hir::ImplItem::TypeAlias(it) => { |
122 | let it = it.source(db).1; | 122 | let it = it.source(db).1; |
@@ -152,12 +152,12 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
152 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.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 src = it.source(db); |
156 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 156 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
157 | } | 157 | } |
158 | hir::ModuleDef::Static(it) => { | 158 | hir::ModuleDef::Static(it) => { |
159 | let it = it.source(db).1; | 159 | let src = it.source(db); |
160 | res.extend(hover_text(it.doc_comment_text(), it.short_label())) | 160 | res.extend(hover_text(src.ast.doc_comment_text(), src.ast.short_label())) |
161 | } | 161 | } |
162 | hir::ModuleDef::Trait(it) => { | 162 | hir::ModuleDef::Trait(it) => { |
163 | let it = it.source(db).1; | 163 | let it = it.source(db).1; |