Trait rustc_middle::ty::context::OnDiskCache [−][src]
pub trait OnDiskCache<'tcx>: Sync {
fn new(sess: &'tcx Session, data: Mmap, start_pos: usize) -> Self
where
Self: Sized;
fn new_empty(source_map: &'tcx SourceMap) -> Self
where
Self: Sized;
fn def_path_hash_to_def_id(
&self,
tcx: TyCtxt<'tcx>,
def_path_hash: DefPathHash
) -> DefId;
fn drop_serialized_data(&self, tcx: TyCtxt<'tcx>);
fn serialize(
&self,
tcx: TyCtxt<'tcx>,
encoder: &mut FileEncoder
) -> FileEncodeResult;
}Required methods
Creates a new OnDiskCache instance from the serialized data in data.
fn def_path_hash_to_def_id(
&self,
tcx: TyCtxt<'tcx>,
def_path_hash: DefPathHash
) -> DefId
fn def_path_hash_to_def_id(
&self,
tcx: TyCtxt<'tcx>,
def_path_hash: DefPathHash
) -> DefId
Converts a DefPathHash to its corresponding DefId in the current compilation
session, if it still exists. This is used during incremental compilation to
turn a deserialized DefPathHash into its current DefId.