1
Fork 0

Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum

Bootstrap compiler update

r? ``@Mark-Simulacrum``
This commit is contained in:
Eric Huss 2022-01-30 08:37:46 -08:00 committed by GitHub
commit 0610d4fa66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 391 additions and 448 deletions

View file

@ -784,24 +784,11 @@ rustc_queries! {
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
load_cached(tcx, id) {
#[cfg(bootstrap)]
{
match match tcx.on_disk_cache().as_ref() {
Some(c) => c.try_load_query_result(*tcx, id),
None => None,
} {
Some(x) => Some(&*tcx.arena.alloc(x)),
None => None,
}
}
#[cfg(not(bootstrap))]
{
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
.on_disk_cache().as_ref()
.and_then(|c| c.try_load_query_result(*tcx, id));
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
.on_disk_cache().as_ref()
.and_then(|c| c.try_load_query_result(*tcx, id));
typeck_results.map(|x| &*tcx.arena.alloc(x))
}
typeck_results.map(|x| &*tcx.arena.alloc(x))
}
}