Do not depend on the stored value when trying to cache on disk.
This commit is contained in:
parent
e015ef5b26
commit
0a5666b838
6 changed files with 12 additions and 25 deletions
|
@ -1033,7 +1033,7 @@ where
|
|||
if res.is_err() {
|
||||
return;
|
||||
}
|
||||
if Q::cache_on_disk(tcx, &key, Some(value)) {
|
||||
if Q::cache_on_disk(tcx, &key) {
|
||||
let dep_node = SerializedDepNodeIndex::new(dep_node.index());
|
||||
|
||||
// Record position of the cache entry.
|
||||
|
|
|
@ -418,7 +418,7 @@ macro_rules! define_queries {
|
|||
|
||||
let key = recover(tcx, dep_node).unwrap_or_else(|| panic!("Failed to recover key for {:?} with hash {}", dep_node, dep_node.hash));
|
||||
let tcx = QueryCtxt::from_tcx(tcx);
|
||||
if queries::$name::cache_on_disk(tcx, &key, None) {
|
||||
if queries::$name::cache_on_disk(tcx, &key) {
|
||||
let _ = tcx.$name(key);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue