pub trait StableHashCtxt {
// Required methods
fn stable_hash_span(&mut self, span: RawSpan, hasher: &mut StableHasher);
fn def_path_hash(&self, def_id: RawDefId) -> RawDefPathHash;
fn stable_hash_controls(&self) -> StableHashControls;
fn assert_default_stable_hash_controls(&self, msg: &str);
}Expand description
This trait lets StableHash and derive(StableHash) be used in
this crate (and other crates upstream of rustc_middle), while leaving
certain operations to be defined in rustc_middle where more things are
visible.
Required Methods§
Sourcefn stable_hash_span(&mut self, span: RawSpan, hasher: &mut StableHasher)
fn stable_hash_span(&mut self, span: RawSpan, hasher: &mut StableHasher)
The main event: stable hashing of a span.
Sourcefn def_path_hash(&self, def_id: RawDefId) -> RawDefPathHash
fn def_path_hash(&self, def_id: RawDefId) -> RawDefPathHash
Compute a DefPathHash.
Sourcefn stable_hash_controls(&self) -> StableHashControls
fn stable_hash_controls(&self) -> StableHashControls
Get the stable hash controls.
Sourcefn assert_default_stable_hash_controls(&self, msg: &str)
fn assert_default_stable_hash_controls(&self, msg: &str)
Assert that the provided StableHashCtxt is configured with the default
StableHashControls. We should always have bailed out before getting to here with a