2271: Force passing Source when creating a SourceAnalyzer r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-11-15 23:12:59 +00:00 committed by GitHub
commit d9d99369b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 51 additions and 54 deletions

View file

@ -129,7 +129,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);