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

@@ -492,9 +492,7 @@ impl<'a, 'tcx> CacheDecoder<'a, 'tcx> {
// expansion, so we use `import_source_files` to ensure that the foreign
// source files are actually imported before we call `source_file_by_stable_id`.
if source_file_cnum != LOCAL_CRATE {
self.tcx
.cstore_untracked()
.import_source_files(self.tcx.sess, source_file_cnum);
self.tcx.import_source_files(source_file_cnum);
}
source_map