Skip to content

Commit f0c2760

Browse files
committed
Some tiny improvements to try_execute_query.
The previous commit inlined `execute_job` without changing any of its code. This commit does a few tiny follow-up changes.
1 parent 8b0c259 commit f0c2760

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

compiler/rustc_query_impl/src/execution.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn try_execute_query<'tcx, C: QueryCache, const INCR: bool>(
316316
let job = QueryJob::new(id, span, current_job_id);
317317
entry.insert((key, ActiveKeyStatus::Started(job)));
318318

319-
// Drop the lock before we start executing the query
319+
// Drop the lock before we start executing the query.
320320
drop(state_lock);
321321

322322
// Set up a guard object that will automatically poison the query if a
@@ -332,13 +332,13 @@ fn try_execute_query<'tcx, C: QueryCache, const INCR: bool>(
332332
execute_job_non_incr(query, tcx, key, id)
333333
};
334334

335-
let cache = &query.cache;
336335
if query.feedable {
337336
check_feedable_consistency(tcx, query, key, &value);
338337
}
339338

340-
// Tell the guard to perform completion bookkeeping, and also to not poison the query.
341-
job_guard.complete(cache, value, dep_node_index);
339+
// Tell the guard to insert `value` in the cache and remove the status entry from
340+
// `query.state`.
341+
job_guard.complete(&query.cache, value, dep_node_index);
342342

343343
(value, Some(dep_node_index))
344344
}

0 commit comments

Comments
 (0)