mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Force passing Source when creating a SourceAnalyzer
This commit is contained in:
parent
1c819fc8f6
commit
d898ecb8f2
10 changed files with 51 additions and 53 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue