1
Fork 0

Rollup merge of #121167 - petrochenkov:unload2, r=wesleywiser

resolve: Scale back unloading of speculatively loaded crates

Fixes https://github.com/rust-lang/rust/issues/120830 and fixes https://github.com/rust-lang/rust/issues/120909 while still unblocking https://github.com/rust-lang/rust/pull/117772.

I cannot reproduce https://github.com/parasyte/crash-rustc as an UI test for some reason, but I tested all the cases linked above manually.
This commit is contained in:
Nilstrieb 2024-02-20 15:13:50 +01:00 committed by GitHub
commit 073d2983a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 26 additions and 18 deletions

View file

@ -250,7 +250,7 @@ fn get_lang_items(tcx: TyCtxt<'_>, (): ()) -> LanguageItems {
let mut collector = LanguageItemCollector::new(tcx, resolver);
// Collect lang items in other crates.
for &cnum in tcx.crates(()).iter() {
for &cnum in tcx.used_crates(()).iter() {
for &(def_id, lang_item) in tcx.defined_lang_items(cnum).iter() {
collector.collect_item(lang_item, def_id, None);
}