@@ -120,7 +120,7 @@ fn handle_cycle_error<'tcx, C: QueryCache>(
120120 match query. cycle_error_handling {
121121 CycleErrorHandling :: Error => {
122122 let guar = error. emit ( ) ;
123- query. value_from_cycle_error ( tcx, cycle_error, guar)
123+ ( query. value_from_cycle_error ) ( tcx, cycle_error, guar)
124124 }
125125 CycleErrorHandling :: Fatal => {
126126 error. emit ( ) ;
@@ -129,7 +129,7 @@ fn handle_cycle_error<'tcx, C: QueryCache>(
129129 }
130130 CycleErrorHandling :: DelayBug => {
131131 let guar = error. delay_as_bug ( ) ;
132- query. value_from_cycle_error ( tcx, cycle_error, guar)
132+ ( query. value_from_cycle_error ) ( tcx, cycle_error, guar)
133133 }
134134 CycleErrorHandling :: Stash => {
135135 let guar = if let Some ( root) = cycle_error. cycle . first ( )
@@ -139,7 +139,7 @@ fn handle_cycle_error<'tcx, C: QueryCache>(
139139 } else {
140140 error. emit ( )
141141 } ;
142- query. value_from_cycle_error ( tcx, cycle_error, guar)
142+ ( query. value_from_cycle_error ) ( tcx, cycle_error, guar)
143143 }
144144 }
145145}
@@ -508,7 +508,9 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache>(
508508
509509 // First we try to load the result from the on-disk cache.
510510 // Some things are never cached on disk.
511- if let Some ( result) = query. try_load_from_disk ( tcx, key, prev_dep_node_index, dep_node_index) {
511+ if let Some ( result) =
512+ ( query. try_load_from_disk_fn ) ( tcx, key, prev_dep_node_index, dep_node_index)
513+ {
512514 if std:: intrinsics:: unlikely ( tcx. sess . opts . unstable_opts . query_dep_graph ) {
513515 dep_graph_data. mark_debug_loaded_from_disk ( * dep_node)
514516 }
@@ -541,15 +543,15 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache>(
541543 // We always expect to find a cached result for things that
542544 // can be forced from `DepNode`.
543545 debug_assert ! (
544- !query. will_cache_on_disk_for_key ( tcx, key)
546+ !( query. will_cache_on_disk_for_key_fn ) ( tcx, key)
545547 || !tcx. key_fingerprint_style( dep_node. kind) . reconstructible( ) ,
546548 "missing on-disk cache entry for {dep_node:?}"
547549 ) ;
548550
549551 // Sanity check for the logic in `ensure`: if the node is green and the result loadable,
550552 // we should actually be able to load it.
551553 debug_assert ! (
552- !query. is_loadable_from_disk ( tcx, key, prev_dep_node_index) ,
554+ !( query. is_loadable_from_disk_fn ) ( tcx, key, prev_dep_node_index) ,
553555 "missing on-disk cache entry for loadable {dep_node:?}"
554556 ) ;
555557
@@ -646,7 +648,7 @@ fn check_if_ensure_can_skip_execution<'tcx, C: QueryCache>(
646648 // In ensure-done mode, we can only skip execution for this key if
647649 // there's a disk-cached value available to load later if needed,
648650 // which guarantees the query provider will never run for this key.
649- let is_loadable = query. is_loadable_from_disk ( tcx, key, serialized_dep_node_index) ;
651+ let is_loadable = ( query. is_loadable_from_disk_fn ) ( tcx, key, serialized_dep_node_index) ;
650652 EnsureCanSkip { skip_execution : is_loadable, dep_node : Some ( dep_node) }
651653 }
652654 }
0 commit comments