resolve: Unload speculatively resolved crates before freezing cstore

This commit is contained in:
Vadim Petrochenkov 2024-01-04 16:57:24 +03:00
parent 037f515caf
commit a2ab48c21b
6 changed files with 52 additions and 16 deletions

View file

@ -1625,6 +1625,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
self.tcx
.sess
.time("resolve_postprocess", || self.crate_loader(|c| c.postprocess(krate)));
self.crate_loader(|c| c.unload_unused_crates());
});
// Make sure we don't mutate the cstore from here on.