1
Fork 0

resolve: Scale back unloading of speculatively loaded crates

This commit is contained in:
Vadim Petrochenkov 2024-02-14 21:40:45 +03:00
parent 8b21296b5d
commit 24cffbf703
7 changed files with 26 additions and 18 deletions

View file

@ -1872,6 +1872,13 @@ rustc_queries! {
eval_always
desc { "fetching all foreign CrateNum instances" }
}
// Crates that are loaded non-speculatively (not for diagnostics or doc links).
// FIXME: This is currently only used for collecting lang items, but should be used instead of
// `crates` in most other cases too.
query used_crates(_: ()) -> &'tcx [CrateNum] {
eval_always
desc { "fetching `CrateNum`s for all crates loaded non-speculatively" }
}
/// A list of all traits in a crate, used by rustdoc and error reporting.
query traits(_: CrateNum) -> &'tcx [DefId] {