Force passing Source when creating a SourceAnalyzer

This commit is contained in:
Aleksey Kladov 2019-11-16 00:56:51 +03:00
parent 1c819fc8f6
commit d898ecb8f2
10 changed files with 51 additions and 53 deletions

View file

@ -117,7 +117,8 @@ pub(crate) fn classify_name_ref(
let _p = profile("classify_name_ref");
let parent = name_ref.syntax().parent()?;
let analyzer = SourceAnalyzer::new(db, file_id, name_ref.syntax(), None);
let analyzer =
SourceAnalyzer::new(db, hir::Source::new(file_id.into(), name_ref.syntax()), None);
if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) {
tested_by!(goto_definition_works_for_methods);