Skip to content

Commit 0a36812

Browse files
committed
Fix and update changes
1 parent 76c099c commit 0a36812

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub struct QueryVTable<'tcx, C: QueryCache> {
102102

103103
/// Function pointer that tries to load a query value from disk.
104104
///
105-
/// This should only be called after a successful check of `will_cache_on_disk_for_key_fn`.
105+
/// This should only be called after a successful check of [`Self::will_cache_on_disk_for_key`].
106106
pub try_load_from_disk_fn:
107107
fn(tcx: TyCtxt<'tcx>, prev_index: SerializedDepNodeIndex) -> Option<C::Value>,
108108

compiler/rustc_query_impl/src/execution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ fn load_from_disk_or_invoke_provider_green<'tcx, C: QueryCache>(
498498
debug_assert!(dep_graph_data.is_index_green(prev_index));
499499

500500
// First try to load the result from the on-disk cache. Some things are never cached on disk.
501-
let try_value = if (query.will_cache_on_disk_for_key_fn)(key) {
501+
let try_value = if query.will_cache_on_disk_for_key(key) {
502502
let prof_timer = tcx.prof.incr_cache_loading();
503503
let value = (query.try_load_from_disk_fn)(tcx, prev_index);
504504
prof_timer.finish_with_query_invocation_id(dep_node_index.into());

compiler/rustc_query_impl/src/query_impl.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ macro_rules! define_queries {
148148
try_load_from_disk_fn: |tcx, prev_index| {
149149
use rustc_middle::queries::$name::{ProvidedValue, provided_to_erased};
150150

151-
// Check the cache-on-disk condition for this key.
152-
#[cfg($separate_provide_extern)]
153-
QueryKey::as_local_key(&_key)?;
154-
155151
let loaded_value: ProvidedValue<'tcx> =
156152
$crate::plumbing::try_load_from_disk(tcx, prev_index)?;
157153

0 commit comments

Comments
 (0)