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

@ -1,12 +1,13 @@
use crate::def_id::DefId;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_span::def_id::DefIdMap;
use rustc_span::Symbol;
#[derive(Debug, Default)]
pub struct DiagnosticItems {
pub id_to_name: FxHashMap<DefId, Symbol>,
pub name_to_id: FxHashMap<Symbol, DefId>,
pub id_to_name: DefIdMap<Symbol>,
pub name_to_id: FxIndexMap<Symbol, DefId>,
}
impl<CTX: crate::HashStableContext> HashStable<CTX> for DiagnosticItems {