pub trait HashStableContext {
// Required methods
fn span_hash_stable(&mut self, span: Span, hasher: &mut StableHasher);
fn def_path_hash(&self, def_id: DefId) -> DefPathHash;
fn assert_default_hashing_controls(&self, msg: &str);
}Expand description
Requirements for a StableHashingContext to be used in this crate.
This is a hack to allow using the [HashStable_Generic] derive macro
instead of implementing everything in rustc_middle.
Required Methods§
Sourcefn span_hash_stable(&mut self, span: Span, hasher: &mut StableHasher)
fn span_hash_stable(&mut self, span: Span, hasher: &mut StableHasher)
The main event: stable hashing of a span.
Sourcefn def_path_hash(&self, def_id: DefId) -> DefPathHash
fn def_path_hash(&self, def_id: DefId) -> DefPathHash
Compute a DefPathHash.
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