mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge #2271
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:
commit
d9d99369b2
10 changed files with 51 additions and 54 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue