@@ -491,13 +491,7 @@ where
491491 // `to_dep_node` is expensive for some `DepKind`s.
492492 let dep_node = dep_node_opt. unwrap_or_else ( || query. to_dep_node ( * tcx. dep_context ( ) , & key) ) ;
493493
494- tcx. dep_context ( ) . dep_graph ( ) . with_task (
495- dep_node,
496- * tcx. dep_context ( ) ,
497- key,
498- compute,
499- query. hash_result ,
500- )
494+ dep_graph. with_task ( dep_node, * tcx. dep_context ( ) , key, compute, query. hash_result )
501495 } ) ;
502496
503497 prof_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
@@ -531,10 +525,10 @@ where
531525 // Note this function can be called concurrently from the same query
532526 // We must ensure that this is handled correctly.
533527
534- let ( prev_dep_node_index , dep_node_index ) =
535- tcx . dep_context ( ) . dep_graph ( ) . try_mark_green ( tcx, & dep_node) ?;
528+ let dep_graph = tcx . dep_context ( ) . dep_graph ( ) ;
529+ let ( prev_dep_node_index , dep_node_index ) = dep_graph. try_mark_green ( tcx, & dep_node) ?;
536530
537- debug_assert ! ( tcx . dep_context ( ) . dep_graph( ) . is_green( dep_node) ) ;
531+ debug_assert ! ( dep_graph. is_green( dep_node) ) ;
538532
539533 // First we try to load the result from the on-disk cache.
540534 // Some things are never cached on disk.
@@ -567,8 +561,7 @@ where
567561 let prof_timer = tcx. dep_context ( ) . profiler ( ) . query_provider ( ) ;
568562
569563 // The dep-graph for this computation is already in-place.
570- let result =
571- tcx. dep_context ( ) . dep_graph ( ) . with_ignore ( || compute ( * tcx. dep_context ( ) , key. clone ( ) ) ) ;
564+ let result = dep_graph. with_ignore ( || compute ( * tcx. dep_context ( ) , key. clone ( ) ) ) ;
572565
573566 prof_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
574567
0 commit comments