@@ -411,7 +411,8 @@ where
411
411
return v;
412
412
}
413
413
} ;
414
- return force_query_with_job ( tcx, key, job, * dep_node, query) . 0 ;
414
+ let ( result, dep_node_index) = force_query_with_job ( tcx, key, job. id , * dep_node, query) ;
415
+ return job. complete ( result, dep_node_index) ;
415
416
} ;
416
417
417
418
let job = match job {
@@ -428,7 +429,8 @@ where
428
429
// expensive for some `DepKind`s.
429
430
if !tcx. dep_graph ( ) . is_fully_enabled ( ) {
430
431
let null_dep_node = DepNode :: new_no_params ( DepKind :: NULL ) ;
431
- return force_query_with_job ( tcx, key, job, null_dep_node, query) . 0 ;
432
+ let ( result, dep_node_index) = force_query_with_job ( tcx, key, job. id , null_dep_node, query) ;
433
+ return job. complete ( result, dep_node_index) ;
432
434
}
433
435
434
436
if query. anon {
@@ -478,7 +480,8 @@ where
478
480
}
479
481
}
480
482
481
- let ( result, dep_node_index) = force_query_with_job ( tcx, key, job, dep_node, query) ;
483
+ let ( result, dep_node_index) = force_query_with_job ( tcx, key, job. id , dep_node, query) ;
484
+ let result = job. complete ( result, dep_node_index) ;
482
485
tcx. dep_graph ( ) . read_index ( dep_node_index) ;
483
486
result
484
487
}
@@ -572,17 +575,15 @@ fn incremental_verify_ich<CTX, K, V>(
572
575
}
573
576
574
577
#[ inline( always) ]
575
- fn force_query_with_job < C , CTX > (
578
+ fn force_query_with_job < CTX , K , V > (
576
579
tcx : CTX ,
577
- key : C :: Key ,
578
- job : JobOwner < ' _ , CTX , C > ,
580
+ key : K ,
581
+ job_id : QueryJobId < CTX :: DepKind > ,
579
582
dep_node : DepNode < CTX :: DepKind > ,
580
- query : & QueryVtable < CTX , C :: Key , C :: Value > ,
581
- ) -> ( C :: Stored , DepNodeIndex )
583
+ query : & QueryVtable < CTX , K , V > ,
584
+ ) -> ( V , DepNodeIndex )
582
585
where
583
- C : QueryCache ,
584
- C :: Key : Eq + Clone + Debug ,
585
- C :: Stored : Clone ,
586
+ K : Eq + Clone + Debug ,
586
587
CTX : QueryContext ,
587
588
{
588
589
// If the following assertion triggers, it can have two reasons:
@@ -602,7 +603,7 @@ where
602
603
let prof_timer = tcx. profiler ( ) . query_provider ( ) ;
603
604
604
605
let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
605
- tcx. start_query ( job . id , diagnostics, |tcx| {
606
+ tcx. start_query ( job_id , diagnostics, |tcx| {
606
607
if query. eval_always {
607
608
tcx. dep_graph ( ) . with_eval_always_task (
608
609
dep_node,
@@ -625,8 +626,6 @@ where
625
626
}
626
627
}
627
628
628
- let result = job. complete ( result, dep_node_index) ;
629
-
630
629
( result, dep_node_index)
631
630
}
632
631
0 commit comments