@@ -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}
@@ -506,7 +506,9 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache>(
506506
507507 // First we try to load the result from the on-disk cache.
508508 // Some things are never cached on disk.
509- if let Some ( result) = query. try_load_from_disk ( tcx, key, prev_dep_node_index, dep_node_index) {
509+ if let Some ( result) =
510+ ( query. try_load_from_disk_fn ) ( tcx, key, prev_dep_node_index, dep_node_index)
511+ {
510512 if std:: intrinsics:: unlikely ( tcx. sess . opts . unstable_opts . query_dep_graph ) {
511513 dep_graph_data. mark_debug_loaded_from_disk ( * dep_node)
512514 }
@@ -539,15 +541,15 @@ fn try_load_from_disk_and_cache_in_memory<'tcx, C: QueryCache>(
539541 // We always expect to find a cached result for things that
540542 // can be forced from `DepNode`.
541543 debug_assert ! (
542- !query. will_cache_on_disk_for_key ( tcx, key)
544+ !( query. will_cache_on_disk_for_key_fn ) ( tcx, key)
543545 || !tcx. key_fingerprint_style( dep_node. kind) . reconstructible( ) ,
544546 "missing on-disk cache entry for {dep_node:?}"
545547 ) ;
546548
547549 // Sanity check for the logic in `ensure`: if the node is green and the result loadable,
548550 // we should actually be able to load it.
549551 debug_assert ! (
550- !query. is_loadable_from_disk ( tcx, key, prev_dep_node_index) ,
552+ !( query. is_loadable_from_disk_fn ) ( tcx, key, prev_dep_node_index) ,
551553 "missing on-disk cache entry for loadable {dep_node:?}"
552554 ) ;
553555
@@ -644,7 +646,7 @@ fn check_if_ensure_can_skip_execution<'tcx, C: QueryCache>(
644646 // In ensure-done mode, we can only skip execution for this key if
645647 // there's a disk-cached value available to load later if needed,
646648 // which guarantees the query provider will never run for this key.
647- let is_loadable = query. is_loadable_from_disk ( tcx, key, serialized_dep_node_index) ;
649+ let is_loadable = ( query. is_loadable_from_disk_fn ) ( tcx, key, serialized_dep_node_index) ;
648650 EnsureCanSkip { skip_execution : is_loadable, dep_node : Some ( dep_node) }
649651 }
650652 }
0 commit comments