aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/hover.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
committerAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
commit61e1474ab35deb7d54cc2f5d710b901f200b6467 (patch)
tree158afa2f165a70fdcb5870c940cc9653854e59fa /crates/ra_ide_api/src/hover.rs
parentc8bcfe6a05d82e151d459bcd2bd8a7b2742f7a66 (diff)
fix typos in mbe tests
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