]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_hir/src/diagnostic_items.rs
Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk
[rust.git] / compiler / rustc_hir / src / diagnostic_items.rs
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 }