Add a temporary hack before env fix lands in bootstrap
This commit is contained in:
parent
6b5f63c3fc
commit
2f555dec4a
@ -771,6 +771,18 @@
|
||||
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));
|
||||
@ -778,6 +790,7 @@
|
||||
typeck_results.map(|x| &*tcx.arena.alloc(x))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query used_trait_imports(key: LocalDefId) -> &'tcx FxHashSet<LocalDefId> {
|
||||
desc { |tcx| "used_trait_imports `{}`", tcx.def_path_str(key.to_def_id()) }
|
||||
|
Loading…
Reference in New Issue
Block a user