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
This trait lets HashStable and derive(HashStable_Generic) 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: 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