[][src]Trait rustc_span::HashStableContext

pub trait HashStableContext {
    fn hash_def_id(&mut self, _: DefId, hasher: &mut StableHasher);
fn hash_crate_num(&mut self, _: CrateNum, hasher: &mut StableHasher);
fn hash_spans(&self) -> bool;
fn byte_pos_to_line_and_col(
        &mut self,
        byte: BytePos
    ) -> Option<(Lrc<SourceFile>, usize, BytePos)>; }

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 librustc_middle.

Required methods

fn hash_def_id(&mut self, _: DefId, hasher: &mut StableHasher)

fn hash_crate_num(&mut self, _: CrateNum, hasher: &mut StableHasher)

fn hash_spans(&self) -> bool

fn byte_pos_to_line_and_col(
    &mut self,
    byte: BytePos
) -> Option<(Lrc<SourceFile>, usize, BytePos)>

Loading content...

Implementors

Loading content...