rustc_middle/middle/
dead_code.rs1use rustc_data_structures::fx::FxIndexSet;
2use rustc_hir::def_id::{DefId, LocalDefIdMap, LocalDefIdSet};
3use rustc_macros::StableHash;
4
5#[derive(#[automatically_derived]
impl ::core::clone::Clone for DeadCodeLivenessSnapshot {
#[inline]
fn clone(&self) -> DeadCodeLivenessSnapshot {
DeadCodeLivenessSnapshot {
live_symbols: ::core::clone::Clone::clone(&self.live_symbols),
ignored_derived_traits: ::core::clone::Clone::clone(&self.ignored_derived_traits),
}
}
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for DeadCodeLivenessSnapshot {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"DeadCodeLivenessSnapshot", "live_symbols", &self.live_symbols,
"ignored_derived_traits", &&self.ignored_derived_traits)
}
}Debug, const _: () =
{
impl ::rustc_data_structures::stable_hasher::StableHash for
DeadCodeLivenessSnapshot {
#[inline]
fn stable_hash<__Hcx: ::rustc_data_structures::stable_hasher::StableHashCtxt>(&self,
__hcx: &mut __Hcx,
__hasher:
&mut ::rustc_data_structures::stable_hasher::StableHasher) {
match *self {
DeadCodeLivenessSnapshot {
live_symbols: ref __binding_0,
ignored_derived_traits: ref __binding_1 } => {
{ __binding_0.stable_hash(__hcx, __hasher); }
{ __binding_1.stable_hash(__hcx, __hasher); }
}
}
}
}
};StableHash)]
7pub struct DeadCodeLivenessSnapshot {
8 pub live_symbols: LocalDefIdSet,
9 pub ignored_derived_traits: LocalDefIdMap<FxIndexSet<DefId>>,
12}
13
14#[derive(#[automatically_derived]
impl ::core::clone::Clone for DeadCodeLivenessSummary {
#[inline]
fn clone(&self) -> DeadCodeLivenessSummary {
DeadCodeLivenessSummary {
pre_deferred_seeding: ::core::clone::Clone::clone(&self.pre_deferred_seeding),
final_result: ::core::clone::Clone::clone(&self.final_result),
}
}
}Clone, #[automatically_derived]
impl ::core::fmt::Debug for DeadCodeLivenessSummary {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"DeadCodeLivenessSummary", "pre_deferred_seeding",
&self.pre_deferred_seeding, "final_result", &&self.final_result)
}
}Debug, const _: () =
{
impl ::rustc_data_structures::stable_hasher::StableHash for
DeadCodeLivenessSummary {
#[inline]
fn stable_hash<__Hcx: ::rustc_data_structures::stable_hasher::StableHashCtxt>(&self,
__hcx: &mut __Hcx,
__hasher:
&mut ::rustc_data_structures::stable_hasher::StableHasher) {
match *self {
DeadCodeLivenessSummary {
pre_deferred_seeding: ref __binding_0,
final_result: ref __binding_1 } => {
{ __binding_0.stable_hash(__hcx, __hasher); }
{ __binding_1.stable_hash(__hcx, __hasher); }
}
}
}
}
};StableHash)]
20pub struct DeadCodeLivenessSummary {
21 pub pre_deferred_seeding: DeadCodeLivenessSnapshot,
22 pub final_result: DeadCodeLivenessSnapshot,
23}