aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/references
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-15 21:56:51 +0000
committerAleksey Kladov <[email protected]>2019-11-15 23:12:35 +0000
commitd898ecb8f2c19eb041bcb27c7ce9edd9d891f2c2 (patch)
treea04aceb743365d7c246e5eb73e56be0a4e905c76 /crates/ra_ide_api/src/references
parent1c819fc8f66def9661c7640051a40e5e820acd71 (diff)
Force passing Source when creating a SourceAnalyzer
Diffstat (limited to 'crates/ra_ide_api/src/references')
-rw-r--r--crates/ra_ide_api/src/references/classify.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/references/classify.rs b/crates/ra_ide_api/src/references/classify.rs
index b5e35e29f..0228c634d 100644
--- a/crates/ra_ide_api/src/references/classify.rs
+++ b/crates/ra_ide_api/src/references/classify.rs
@@ -117,7 +117,8 @@ pub(crate) fn classify_name_ref(
117 let _p = profile("classify_name_ref"); 117 let _p = profile("classify_name_ref");
118 118
119 let parent = name_ref.syntax().parent()?; 119 let parent = name_ref.syntax().parent()?;
120 let analyzer = SourceAnalyzer::new(db, file_id, name_ref.syntax(), None); 120 let analyzer =
121 SourceAnalyzer::new(db, hir::Source::new(file_id.into(), name_ref.syntax()), None);
121 122
122 if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) { 123 if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) {
123 tested_by!(goto_definition_works_for_methods); 124 tested_by!(goto_definition_works_for_methods);