mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Ensure uniqueness of file ids in reference search via hashmap
This commit is contained in:
parent
fbdb32adfc
commit
2c1777a2e2
9 changed files with 122 additions and 121 deletions
|
@ -3,8 +3,8 @@
|
|||
use indexmap::IndexMap;
|
||||
|
||||
use hir::Semantics;
|
||||
use ide_db::call_info::FnCallNode;
|
||||
use ide_db::RootDatabase;
|
||||
use ide_db::{call_info::FnCallNode, search::FileReferences};
|
||||
use syntax::{ast, AstNode, TextRange};
|
||||
|
||||
use crate::{
|
||||
|
@ -47,7 +47,7 @@ pub(crate) fn incoming_calls(db: &RootDatabase, position: FilePosition) -> Optio
|
|||
|
||||
let mut calls = CallLocations::default();
|
||||
|
||||
for &FileReferences { file_id, ref references } in refs.info.references() {
|
||||
for (&file_id, references) in refs.info.references().iter() {
|
||||
let file = sema.parse(file_id);
|
||||
let file = file.syntax();
|
||||
for reference in references {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue