1
Fork 0

Start replacing CStore trait methods with hooks.

This also avoids the cyclic definition issues with CrateStore being
defined after TyCtxt, but needing to be used in TyCtxt.
This commit is contained in:
Oli Scherer 2024-03-26 12:06:07 +00:00
parent b13a71a2e7
commit 32bd3c30d8
4 changed files with 20 additions and 19 deletions

View file

@ -230,12 +230,6 @@ pub trait CrateStore: std::fmt::Debug {
index_guess: u32,
hash: ExpnHash,
) -> ExpnId;
/// Imports all `SourceFile`s from the given crate into the current session.
/// This normally happens automatically when we decode a `Span` from
/// that crate's metadata - however, the incr comp cache needs
/// to trigger this manually when decoding a foreign `Span`
fn import_source_files(&self, sess: &Session, cnum: CrateNum);
}
pub type CrateStoreDyn = dyn CrateStore + sync::DynSync + sync::DynSend;