diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-15 23:12:59 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-15 23:12:59 +0000 |
commit | d9d99369b2765eaef7f49cd519990769191c3381 (patch) | |
tree | 5685e9db16e4a35c7ff3158d5c09becf9a45b31d /crates/ra_ide_api/src/references/classify.rs | |
parent | 69f3b01dc5dd70d9bdf6de4d859ad593a689395d (diff) | |
parent | d898ecb8f2c19eb041bcb27c7ce9edd9d891f2c2 (diff) |
Merge #2271
2271: Force passing Source when creating a SourceAnalyzer r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/references/classify.rs')
-rw-r--r-- | crates/ra_ide_api/src/references/classify.rs | 3 |
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 0eeaa7f38..f12b58cb9 100644 --- a/crates/ra_ide_api/src/references/classify.rs +++ b/crates/ra_ide_api/src/references/classify.rs | |||
@@ -129,7 +129,8 @@ pub(crate) fn classify_name_ref( | |||
129 | let _p = profile("classify_name_ref"); | 129 | let _p = profile("classify_name_ref"); |
130 | 130 | ||
131 | let parent = name_ref.syntax().parent()?; | 131 | let parent = name_ref.syntax().parent()?; |
132 | let analyzer = SourceAnalyzer::new(db, file_id, name_ref.syntax(), None); | 132 | let analyzer = |
133 | SourceAnalyzer::new(db, hir::Source::new(file_id.into(), name_ref.syntax()), None); | ||
133 | 134 | ||
134 | if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) { | 135 | if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) { |
135 | tested_by!(goto_definition_works_for_methods); | 136 | tested_by!(goto_definition_works_for_methods); |