Skip to content

Commit 4f76266

Browse files
committed
rustc_query_system: minor cleanup
Remove effectively unused parameter and delete out of date comment.
1 parent dd1ab84 commit 4f76266

File tree

1 file changed

+3
-17
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+3
-17
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ impl<K: DepKind> DepGraph<K> {
242242
key,
243243
cx,
244244
arg,
245-
false,
246245
task,
247246
|_key| {
248247
Some(TaskDeps {
@@ -262,29 +261,16 @@ impl<K: DepKind> DepGraph<K> {
262261
key: DepNode<K>,
263262
cx: Ctxt,
264263
arg: A,
265-
no_tcx: bool,
266264
task: fn(Ctxt, A) -> R,
267265
create_task: fn(DepNode<K>) -> Option<TaskDeps<K>>,
268266
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
269267
) -> (R, DepNodeIndex) {
270268
if let Some(ref data) = self.data {
271269
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));
286271
let edges = task_deps.map_or_else(|| smallvec![], |lock| lock.into_inner().reads);
287272

273+
let mut hcx = cx.create_stable_hashing_context();
288274
let current_fingerprint = hash_result(&mut hcx, &result);
289275

290276
let print_status = cfg!(debug_assertions) && cx.debug_dep_tasks();
@@ -413,7 +399,7 @@ impl<K: DepKind> DepGraph<K> {
413399
task: fn(Ctxt, A) -> R,
414400
hash_result: impl FnOnce(&mut Ctxt::StableHashingContext, &R) -> Option<Fingerprint>,
415401
) -> (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)
417403
}
418404

419405
#[inline]

0 commit comments

Comments
 (0)