Skip to content

Commit 52b8040

Browse files
committed
Rename cache_on_disk variables.
To `cache_on_disk_if` to match the query modifier name.
1 parent e036cc2 commit 52b8040

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
@@ -269,7 +269,7 @@ fn make_modifiers_stream(query: &Query) -> proc_macro2::TokenStream {
269269

270270
let anon = anon.is_some();
271271
let arena_cache = arena_cache.is_some();
272-
let cache_on_disk = cache_on_disk_if.is_some();
272+
let cache_on_disk_if = cache_on_disk_if.is_some();
273273

274274
let cycle_error_handling = if cycle_delayed_bug.is_some() {
275275
quote! { DelayedBug }
@@ -296,7 +296,7 @@ fn make_modifiers_stream(query: &Query) -> proc_macro2::TokenStream {
296296
// tidy-alphabetical-start
297297
anon: #anon,
298298
arena_cache: #arena_cache,
299-
cache_on_disk: #cache_on_disk,
299+
cache_on_disk_if: #cache_on_disk_if,
300300
cycle_error_handling: #cycle_error_handling,
301301
depth_limit: #depth_limit,
302302
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
@@ -305,7 +305,7 @@ macro_rules! define_callbacks {
305305
// Search for (QMODLIST) to find all occurrences of this query modifier list.
306306
anon: $anon:literal,
307307
arena_cache: $arena_cache:literal,
308-
cache_on_disk: $cache_on_disk:literal,
308+
cache_on_disk_if: $cache_on_disk_if:literal,
309309
cycle_error_handling: $cycle_error_handling:ident,
310310
depth_limit: $depth_limit:literal,
311311
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
@@ -319,7 +319,7 @@ macro_rules! define_queries {
319319
// Search for (QMODLIST) to find all occurrences of this query modifier list.
320320
anon: $anon:literal,
321321
arena_cache: $arena_cache:literal,
322-
cache_on_disk: $cache_on_disk:literal,
322+
cache_on_disk_if: $cache_on_disk_if:literal,
323323
cycle_error_handling: $cycle_error_handling:ident,
324324
depth_limit: $depth_limit:literal,
325325
eval_always: $eval_always:literal,
@@ -441,13 +441,13 @@ macro_rules! define_queries {
441441

442442
invoke_provider_fn: self::invoke_provider_fn::__rust_begin_short_backtrace,
443443

444-
#[cfg($cache_on_disk)]
444+
#[cfg($cache_on_disk_if)]
445445
will_cache_on_disk_for_key_fn:
446446
rustc_middle::queries::_cache_on_disk_if_fns::$name,
447-
#[cfg(not($cache_on_disk))]
447+
#[cfg(not($cache_on_disk_if))]
448448
will_cache_on_disk_for_key_fn: |_, _| false,
449449

450-
#[cfg($cache_on_disk)]
450+
#[cfg($cache_on_disk_if)]
451451
try_load_from_disk_fn: |tcx, key, prev_index, index| {
452452
// Check the `cache_on_disk_if` condition for this key.
453453
if !rustc_middle::queries::_cache_on_disk_if_fns::$name(tcx, key) {
@@ -460,15 +460,15 @@ macro_rules! define_queries {
460460
// Arena-alloc the value if appropriate, and erase it.
461461
Some(queries::$name::provided_to_erased(tcx, value))
462462
},
463-
#[cfg(not($cache_on_disk))]
463+
#[cfg(not($cache_on_disk_if))]
464464
try_load_from_disk_fn: |_tcx, _key, _prev_index, _index| None,
465465

466-
#[cfg($cache_on_disk)]
466+
#[cfg($cache_on_disk_if)]
467467
is_loadable_from_disk_fn: |tcx, key, index| -> bool {
468468
rustc_middle::queries::_cache_on_disk_if_fns::$name(tcx, key) &&
469469
$crate::plumbing::loadable_from_disk(tcx, index)
470470
},
471-
#[cfg(not($cache_on_disk))]
471+
#[cfg(not($cache_on_disk_if))]
472472
is_loadable_from_disk_fn: |_tcx, _key, _index| false,
473473

474474
value_from_cycle_error: |tcx, cycle, guar| {
@@ -582,7 +582,7 @@ macro_rules! define_queries {
582582
query_result_index: &mut EncodedDepNodeIndex,
583583
) {
584584
$(
585-
#[cfg($cache_on_disk)]
585+
#[cfg($cache_on_disk_if)]
586586
{
587587
$crate::plumbing::encode_query_results(
588588
tcx,

0 commit comments

Comments
 (0)