@@ -491,13 +491,7 @@ where
491
491
// `to_dep_node` is expensive for some `DepKind`s.
492
492
let dep_node = dep_node_opt. unwrap_or_else ( || query. to_dep_node ( * tcx. dep_context ( ) , & key) ) ;
493
493
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 )
501
495
} ) ;
502
496
503
497
prof_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
@@ -531,10 +525,10 @@ where
531
525
// Note this function can be called concurrently from the same query
532
526
// We must ensure that this is handled correctly.
533
527
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) ?;
536
530
537
- debug_assert ! ( tcx . dep_context ( ) . dep_graph( ) . is_green( dep_node) ) ;
531
+ debug_assert ! ( dep_graph. is_green( dep_node) ) ;
538
532
539
533
// First we try to load the result from the on-disk cache.
540
534
// Some things are never cached on disk.
@@ -567,8 +561,7 @@ where
567
561
let prof_timer = tcx. dep_context ( ) . profiler ( ) . query_provider ( ) ;
568
562
569
563
// 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 ( ) ) ) ;
572
565
573
566
prof_timer. finish_with_query_invocation_id ( dep_node_index. into ( ) ) ;
574
567
0 commit comments