Skip to content

Commit f70fb2c

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 a5aeac2 commit f70fb2c

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
@@ -314,7 +314,7 @@ fn try_execute_query<'tcx, C: QueryCache, const INCR: bool>(
314314
let job = QueryJob::new(id, span, current_job_id);
315315
entry.insert((key, ActiveKeyStatus::Started(job)));
316316

317-
// Drop the lock before we start executing the query
317+
// Drop the lock before we start executing the query.
318318
drop(state_lock);
319319

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

333-
let cache = &query.cache;
334333
if query.feedable {
335334
check_feedable(tcx, query, key, &value);
336335
}
337336

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

341341
(value, Some(dep_node_index))
342342
}

0 commit comments

Comments
 (0)