@@ -242,7 +242,6 @@ impl<K: DepKind> DepGraph<K> {
242
242
key,
243
243
cx,
244
244
arg,
245
- false ,
246
245
task,
247
246
|_key| {
248
247
Some ( TaskDeps {
@@ -262,29 +261,16 @@ impl<K: DepKind> DepGraph<K> {
262
261
key : DepNode < K > ,
263
262
cx : Ctxt ,
264
263
arg : A ,
265
- no_tcx : bool ,
266
264
task : fn ( Ctxt , A ) -> R ,
267
265
create_task : fn ( DepNode < K > ) -> Option < TaskDeps < K > > ,
268
266
hash_result : impl FnOnce ( & mut Ctxt :: StableHashingContext , & R ) -> Option < Fingerprint > ,
269
267
) -> ( R , DepNodeIndex ) {
270
268
if let Some ( ref data) = self . data {
271
269
let task_deps = create_task ( key) . map ( Lock :: new) ;
272
-
273
- // In incremental mode, hash the result of the task. We don't
274
- // do anything with the hash yet, but we are computing it
275
- // anyway so that
276
- // - we make sure that the infrastructure works and
277
- // - we can get an idea of the runtime cost.
278
- let mut hcx = cx. create_stable_hashing_context ( ) ;
279
-
280
- let result = if no_tcx {
281
- task ( cx, arg)
282
- } else {
283
- K :: with_deps ( task_deps. as_ref ( ) , || task ( cx, arg) )
284
- } ;
285
-
270
+ let result = K :: with_deps ( task_deps. as_ref ( ) , || task ( cx, arg) ) ;
286
271
let edges = task_deps. map_or_else ( || smallvec ! [ ] , |lock| lock. into_inner ( ) . reads ) ;
287
272
273
+ let mut hcx = cx. create_stable_hashing_context ( ) ;
288
274
let current_fingerprint = hash_result ( & mut hcx, & result) ;
289
275
290
276
let print_status = cfg ! ( debug_assertions) && cx. debug_dep_tasks ( ) ;
@@ -413,7 +399,7 @@ impl<K: DepKind> DepGraph<K> {
413
399
task : fn ( Ctxt , A ) -> R ,
414
400
hash_result : impl FnOnce ( & mut Ctxt :: StableHashingContext , & R ) -> Option < Fingerprint > ,
415
401
) -> ( R , DepNodeIndex ) {
416
- self . with_task_impl ( key, cx, arg, false , task, |_| None , hash_result)
402
+ self . with_task_impl ( key, cx, arg, task, |_| None , hash_result)
417
403
}
418
404
419
405
#[ inline]
0 commit comments