]>
Commit | Line | Data |
---|---|---|
c295e0f8 XL |
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; | |
5 | ||
6 | #[derive(Debug, Default)] | |
7 | pub struct DiagnosticItems { | |
8 | pub id_to_name: FxHashMap<DefId, Symbol>, | |
9 | pub name_to_id: FxHashMap<Symbol, DefId>, | |
10 | } | |
11 | ||
12 | impl<CTX: crate::HashStableContext> HashStable<CTX> for DiagnosticItems { | |
13 | #[inline] | |
14 | fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { | |
15 | self.name_to_id.hash_stable(ctx, hasher); | |
16 | } | |
17 | } |