1 use crate::def_id::DefId;
2 use rustc_data_structures::fx::FxHashMap;
3 use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
4 use rustc_span::Symbol;
6 #[derive(Debug, Default)]
7 pub struct DiagnosticItems {
8 pub id_to_name: FxHashMap<DefId, Symbol>,
9 pub name_to_id: FxHashMap<Symbol, DefId>,
12 impl<CTX: crate::HashStableContext> HashStable<CTX> for DiagnosticItems {
14 fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
15 self.name_to_id.hash_stable(ctx, hasher);