mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Switch crate graph to use an Arena instead of a hashmap
This commit is contained in:
parent
236576227a
commit
7f0fbf7f9d
15 changed files with 1499 additions and 1593 deletions
|
@ -13,7 +13,7 @@ use cfg::{CfgDiff, CfgOptions};
|
|||
use paths::{AbsPath, AbsPathBuf};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use semver::Version;
|
||||
use stdx::{always, hash::NoHashHashMap};
|
||||
use stdx::always;
|
||||
|
||||
use crate::{
|
||||
build_scripts::BuildScriptOutput,
|
||||
|
@ -732,7 +732,7 @@ fn project_json_to_crate_graph(
|
|||
});
|
||||
|
||||
let mut cfg_cache: FxHashMap<&str, Vec<CfgFlag>> = FxHashMap::default();
|
||||
let crates: NoHashHashMap<CrateId, CrateId> = project
|
||||
let crates: FxHashMap<CrateId, CrateId> = project
|
||||
.crates()
|
||||
.filter_map(|(crate_id, krate)| Some((crate_id, krate, load(&krate.root_module)?)))
|
||||
.map(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue