pub trait HashStableContext {
// Required methods
fn span_hash_stable(&mut self, span: RawSpan, hasher: &mut StableHasher);
fn def_path_hash(&self, def_id: RawDefId) -> RawDefPathHash;
fn hashing_controls(&self) -> HashingControls;
fn assert_default_hashing_controls(&self, msg: &str);
}Expand description
This trait lets HashStable and derive(HashStable) 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 span_hash_stable(&mut self, span: RawSpan, hasher: &mut StableHasher)
fn span_hash_stable(&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 hashing_controls(&self) -> HashingControls
fn hashing_controls(&self) -> HashingControls
Get the hashing controls.
Sourcefn assert_default_hashing_controls(&self, msg: &str)
fn assert_default_hashing_controls(&self, msg: &str)
Assert that the provided HashStableContext is configured with the default
HashingControls. We should always have bailed out before getting to here with a