mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Prefer test duped crates for ide features
This commit is contained in:
parent
a4c7a87755
commit
e205af259d
10 changed files with 65 additions and 119 deletions
|
@ -43,7 +43,7 @@ pub mod syntax_helpers {
|
|||
pub use parser::LexedStr;
|
||||
}
|
||||
|
||||
use std::{fmt, mem::ManuallyDrop, sync::Arc};
|
||||
use std::{fmt, hash::BuildHasherDefault, mem::ManuallyDrop, sync::Arc};
|
||||
|
||||
use base_db::{
|
||||
salsa::{self, Durability},
|
||||
|
@ -53,6 +53,7 @@ use hir::{
|
|||
db::{DefDatabase, ExpandDatabase, HirDatabase},
|
||||
symbols::FileSymbolKind,
|
||||
};
|
||||
use indexmap::IndexSet;
|
||||
|
||||
use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase};
|
||||
pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
|
||||
|
@ -119,7 +120,10 @@ impl FileLoader for RootDatabase {
|
|||
fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId> {
|
||||
FileLoaderDelegate(self).resolve_path(path)
|
||||
}
|
||||
fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> {
|
||||
fn relevant_crates(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
) -> Arc<IndexSet<CrateId, BuildHasherDefault<FxHasher>>> {
|
||||
FileLoaderDelegate(self).relevant_crates(file_id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue