rustc_hir/
diagnostic_items.rs1use rustc_data_structures::fx::FxIndexMap;
2use rustc_macros::HashStable_Generic;
3use rustc_span::Symbol;
4use rustc_span::def_id::DefIdMap;
5
6use crate::def_id::DefId;
7
8#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DiagnosticItems {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"DiagnosticItems", "id_to_name", &self.id_to_name, "name_to_id",
&&self.name_to_id)
}
}Debug, #[automatically_derived]
impl ::core::default::Default for DiagnosticItems {
#[inline]
fn default() -> DiagnosticItems {
DiagnosticItems {
id_to_name: ::core::default::Default::default(),
name_to_id: ::core::default::Default::default(),
}
}
}Default, const _: () =
{
impl<__CTX> ::rustc_data_structures::stable_hasher::HashStable<__CTX>
for DiagnosticItems where __CTX: crate::HashStableContext {
#[inline]
fn hash_stable(&self, __hcx: &mut __CTX,
__hasher:
&mut ::rustc_data_structures::stable_hasher::StableHasher) {
match *self {
DiagnosticItems {
id_to_name: ref __binding_0, name_to_id: ref __binding_1 }
=> {
{}
{ __binding_1.hash_stable(__hcx, __hasher); }
}
}
}
}
};HashStable_Generic)]
9pub struct DiagnosticItems {
10 #[stable_hasher(ignore)]
11 pub id_to_name: DefIdMap<Symbol>,
12 pub name_to_id: FxIndexMap<Symbol, DefId>,
13}