Trait rustc_span::HashStableContext
source · pub trait HashStableContext {
// Required methods
fn def_path_hash(&self, def_id: DefId) -> DefPathHash;
fn hash_spans(&self) -> bool;
fn unstable_opts_incremental_ignore_spans(&self) -> bool;
fn def_span(&self, def_id: LocalDefId) -> Span;
fn span_data_to_lines_and_cols(
&mut self,
span: &SpanData
) -> Option<(Lrc<SourceFile>, usize, BytePos, usize, BytePos)>;
fn hashing_controls(&self) -> HashingControls;
}
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§
fn def_path_hash(&self, def_id: DefId) -> DefPathHash
fn hash_spans(&self) -> bool
sourcefn unstable_opts_incremental_ignore_spans(&self) -> bool
fn unstable_opts_incremental_ignore_spans(&self) -> bool
Accesses sess.opts.unstable_opts.incremental_ignore_spans
since
we don’t have easy access to a Session