aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/hover.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r--crates/ra_ide_api/src/hover.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index 6545a2581..a390dab65 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -68,7 +68,7 @@ impl HoverResult {
68} 68}
69 69
70pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeInfo<HoverResult>> { 70pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeInfo<HoverResult>> {
71 let file = db.parse(position.file_id); 71 let file = db.parse(position.file_id).tree;
72 let mut res = HoverResult::new(); 72 let mut res = HoverResult::new();
73 73
74 let mut range = None; 74 let mut range = None;
@@ -120,7 +120,7 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
120} 120}
121 121
122pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> { 122pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> {
123 let file = db.parse(frange.file_id); 123 let file = db.parse(frange.file_id).tree;
124 let syntax = file.syntax(); 124 let syntax = file.syntax();
125 let leaf_node = find_covering_element(syntax, frange.range); 125 let leaf_node = find_covering_element(syntax, frange.range);
126 // if we picked identifier, expand to pattern/expression 126 // if we picked identifier, expand to pattern/expression