diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-28 10:02:46 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-28 10:02:46 +0000 |
commit | 16030528b53d38e24c1e5733aa4cc46058d0bbd1 (patch) | |
tree | e878f88aebf11c0e54eff2e107dfaa4d192ab272 /crates/ra_ide/src/hover.rs | |
parent | 2702fa1c5d6d8ad504c0d7703b6363ea09ba5570 (diff) | |
parent | ccd1b0800a5de5e046e6e9a4b6f49030c1ce3639 (diff) |
Merge #2440
2440: Rename Source -> InFile r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/hover.rs')
-rw-r--r-- | crates/ra_ide/src/hover.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index 260a7b869..d8185c688 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs | |||
@@ -227,7 +227,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> { | |||
227 | .take_while(|it| it.text_range() == leaf_node.text_range()) | 227 | .take_while(|it| it.text_range() == leaf_node.text_range()) |
228 | .find(|it| ast::Expr::cast(it.clone()).is_some() || ast::Pat::cast(it.clone()).is_some())?; | 228 | .find(|it| ast::Expr::cast(it.clone()).is_some() || ast::Pat::cast(it.clone()).is_some())?; |
229 | let analyzer = | 229 | let analyzer = |
230 | hir::SourceAnalyzer::new(db, hir::Source::new(frange.file_id.into(), &node), None); | 230 | hir::SourceAnalyzer::new(db, hir::InFile::new(frange.file_id.into(), &node), None); |
231 | let ty = if let Some(ty) = ast::Expr::cast(node.clone()).and_then(|e| analyzer.type_of(db, &e)) | 231 | let ty = if let Some(ty) = ast::Expr::cast(node.clone()).and_then(|e| analyzer.type_of(db, &e)) |
232 | { | 232 | { |
233 | ty | 233 | ty |