Skip to content

Commit e79b2a1

Browse files
committed
Rename cache_on_disk variables.
To `cache_on_disk_if` to match the query modifier name.
1 parent 6e23ee5 commit e79b2a1

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

compiler/rustc_macros/src/query.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn make_modifiers_stream(query: &Query, modifiers: &QueryModifiers) -> proc_macr
256256

257257
let anon = anon.is_some();
258258
let arena_cache = arena_cache.is_some();
259-
let cache_on_disk = cache_on_disk_if.is_some();
259+
let cache_on_disk_if = cache_on_disk_if.is_some();
260260

261261
let cycle_error_handling = if cycle_delayed_bug.is_some() {
262262
quote! { DelayedBug }
@@ -283,7 +283,7 @@ fn make_modifiers_stream(query: &Query, modifiers: &QueryModifiers) -> proc_macr
283283
// tidy-alphabetical-start
284284
anon: #anon,
285285
arena_cache: #arena_cache,
286-
cache_on_disk: #cache_on_disk,
286+
cache_on_disk_if: #cache_on_disk_if,
287287
cycle_error_handling: #cycle_error_handling,
288288
depth_limit: #depth_limit,
289289
eval_always: #eval_always,

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ macro_rules! define_callbacks {
344344
// Search for (QMODLIST) to find all occurrences of this query modifier list.
345345
anon: $anon:literal,
346346
arena_cache: $arena_cache:literal,
347-
cache_on_disk: $cache_on_disk:literal,
347+
cache_on_disk_if: $cache_on_disk_if:literal,
348348
cycle_error_handling: $cycle_error_handling:ident,
349349
depth_limit: $depth_limit:literal,
350350
eval_always: $eval_always:literal,

compiler/rustc_query_impl/src/dep_kind_vtables.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ macro_rules! define_dep_kind_vtables {
135135
// Search for (QMODLIST) to find all occurrences of this query modifier list.
136136
anon: $anon:literal,
137137
arena_cache: $arena_cache:literal,
138-
cache_on_disk: $cache_on_disk:literal,
138+
cache_on_disk_if: $cache_on_disk_if:literal,
139139
cycle_error_handling: $cycle_error_handling:ident,
140140
depth_limit: $depth_limit:literal,
141141
eval_always: $eval_always:literal,
@@ -167,7 +167,7 @@ macro_rules! define_dep_kind_vtables {
167167
$crate::query_impl::$name::VTableGetter,
168168
>(
169169
$anon,
170-
$cache_on_disk,
170+
$cache_on_disk_if,
171171
$eval_always,
172172
)
173173
),*

compiler/rustc_query_impl/src/plumbing.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ macro_rules! define_queries {
307307
// Search for (QMODLIST) to find all occurrences of this query modifier list.
308308
anon: $anon:literal,
309309
arena_cache: $arena_cache:literal,
310-
cache_on_disk: $cache_on_disk:literal,
310+
cache_on_disk_if: $cache_on_disk_if:literal,
311311
cycle_error_handling: $cycle_error_handling:ident,
312312
depth_limit: $depth_limit:literal,
313313
eval_always: $eval_always:literal,
@@ -427,10 +427,10 @@ macro_rules! define_queries {
427427
state: Default::default(),
428428
cache: Default::default(),
429429

430-
#[cfg($cache_on_disk)]
430+
#[cfg($cache_on_disk_if)]
431431
will_cache_on_disk_for_key_fn:
432432
Some(rustc_middle::queries::_cache_on_disk_if_fns::$name),
433-
#[cfg(not($cache_on_disk))]
433+
#[cfg(not($cache_on_disk_if))]
434434
will_cache_on_disk_for_key_fn: None,
435435

436436
call_query_method_fn: |tcx, key| {
@@ -440,7 +440,7 @@ macro_rules! define_queries {
440440
},
441441
invoke_provider_fn: self::invoke_provider_fn::__rust_begin_short_backtrace,
442442

443-
#[cfg($cache_on_disk)]
443+
#[cfg($cache_on_disk_if)]
444444
try_load_from_disk_fn: Some(|tcx, key, prev_index, index| {
445445
// Check the `cache_on_disk_if` condition for this key.
446446
if !rustc_middle::queries::_cache_on_disk_if_fns::$name(tcx, key) {
@@ -453,15 +453,15 @@ macro_rules! define_queries {
453453
// Arena-alloc the value if appropriate, and erase it.
454454
Some(queries::$name::provided_to_erased(tcx, value))
455455
}),
456-
#[cfg(not($cache_on_disk))]
456+
#[cfg(not($cache_on_disk_if))]
457457
try_load_from_disk_fn: None,
458458

459-
#[cfg($cache_on_disk)]
459+
#[cfg($cache_on_disk_if)]
460460
is_loadable_from_disk_fn: Some(|tcx, key, index| -> bool {
461461
rustc_middle::queries::_cache_on_disk_if_fns::$name(tcx, key) &&
462462
$crate::plumbing::loadable_from_disk(tcx, index)
463463
}),
464-
#[cfg(not($cache_on_disk))]
464+
#[cfg(not($cache_on_disk_if))]
465465
is_loadable_from_disk_fn: None,
466466

467467
value_from_cycle_error: |tcx, cycle, guar| {
@@ -575,7 +575,7 @@ macro_rules! define_queries {
575575
query_result_index: &mut EncodedDepNodeIndex,
576576
) {
577577
$(
578-
#[cfg($cache_on_disk)]
578+
#[cfg($cache_on_disk_if)]
579579
{
580580
$crate::plumbing::encode_query_results(
581581
tcx,

0 commit comments

Comments
 (0)