From 0a5666b838c903caf672a05b3b4156cafb03cb3f Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 19 Oct 2021 20:15:13 +0200 Subject: Do not depend on the stored value when trying to cache on disk. --- compiler/rustc_query_impl/src/on_disk_cache.rs | 2 +- compiler/rustc_query_impl/src/plumbing.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_query_impl') diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index 86b12b3586a..7678c86596b 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -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. diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 8c3fbb2071c..a822ef14778 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -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); } } -- cgit 1.4.1-3-g733a5