diff options
author | kjeremy <[email protected]> | 2019-11-18 15:47:19 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-11-18 15:47:19 +0000 |
commit | a22cb1daa76ddc7c5078a7a80b11909dd480f9f2 (patch) | |
tree | d829b5cf22dedfb99dc154b48a3576be48dfbbc6 /crates/ra_ide_api/src/hover.rs | |
parent | 9cc4d058d2b0a8741ef67b71986b4c51b4459426 (diff) |
Use Source<&ast::Name> in classify_name
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index cc25f4c37..c6d678c0c 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -193,7 +193,9 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
193 | None | 193 | None |
194 | } | 194 | } |
195 | } else if let Some(name) = find_node_at_offset::<ast::Name>(file.syntax(), position.offset) { | 195 | } else if let Some(name) = find_node_at_offset::<ast::Name>(file.syntax(), position.offset) { |
196 | if let Some(name_kind) = classify_name(db, position.file_id, &name).map(|d| d.kind) { | 196 | if let Some(name_kind) = |
197 | classify_name(db, Source::new(position.file_id.into(), &name)).map(|d| d.kind) | ||
198 | { | ||
197 | let mut _b: bool = true; | 199 | let mut _b: bool = true; |
198 | res.extend(hover_text_from_name_kind(db, name_kind, &mut _b)); | 200 | res.extend(hover_text_from_name_kind(db, name_kind, &mut _b)); |
199 | } | 201 | } |