1
Fork 0

Replace some instances of FxHashMap/FxHashSet with stable alternatives (mostly in rustc_hir and rustc_ast_lowering)

Part of https://github.com/rust-lang/compiler-team/issues/533
This commit is contained in:
Michael Woerister 2023-12-18 21:02:21 +01:00
parent 2a7634047a
commit 115885ba7e
12 changed files with 36 additions and 41 deletions

View file

@ -8,8 +8,8 @@ pub use crate::def_id::DefPathHash;
use crate::def_id::{CrateNum, DefIndex, LocalDefId, StableCrateId, CRATE_DEF_INDEX, LOCAL_CRATE};
use crate::def_path_hash_map::DefPathHashMap;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::{Hash64, StableHasher};
use rustc_data_structures::unord::UnordMap;
use rustc_index::IndexVec;
use rustc_span::symbol::{kw, sym, Symbol};
@ -95,7 +95,7 @@ impl DefPathTable {
#[derive(Debug)]
pub struct Definitions {
table: DefPathTable,
next_disambiguator: FxHashMap<(LocalDefId, DefPathData), u32>,
next_disambiguator: UnordMap<(LocalDefId, DefPathData), u32>,
/// The [StableCrateId] of the local crate.
stable_crate_id: StableCrateId,