aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/hover.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-11 13:51:02 +0100
committerAleksey Kladov <[email protected]>2019-04-11 14:29:33 +0100
commitb6809b6695f9c4cec82ff98d73f7ff24f96cbecf (patch)
treedd095e6ef28971355b4553a91c081a340f5defa1 /crates/ra_ide_api/src/hover.rs
parent6c2ba945ed331f0ce95eddd5b2183aa6fdf0f94b (diff)
rename
Diffstat (limited to 'crates/ra_ide_api/src/hover.rs')
-rw-r--r--crates/ra_ide_api/src/hover.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs
index ec167a196..0cba5a665 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide_api/src/hover.rs
@@ -132,7 +132,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> {
132 .ancestors() 132 .ancestors()
133 .take_while(|it| it.range() == leaf_node.range()) 133 .take_while(|it| it.range() == leaf_node.range())
134 .find(|&it| ast::Expr::cast(it).is_some() || ast::Pat::cast(it).is_some())?; 134 .find(|&it| ast::Expr::cast(it).is_some() || ast::Pat::cast(it).is_some())?;
135 let analyzer = hir::SourceAnalyser::new(db, frange.file_id, node); 135 let analyzer = hir::SourceAnalyzer::new(db, frange.file_id, node);
136 let ty = if let Some(ty) = ast::Expr::cast(node).and_then(|e| analyzer.type_of(db, e)) { 136 let ty = if let Some(ty) = ast::Expr::cast(node).and_then(|e| analyzer.type_of(db, e)) {
137 ty 137 ty
138 } else if let Some(ty) = ast::Pat::cast(node).and_then(|p| analyzer.type_of_pat(db, p)) { 138 } else if let Some(ty) = ast::Pat::cast(node).and_then(|p| analyzer.type_of_pat(db, p)) {