Skip to content

Commit

Permalink
Support parallel compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Feb 4, 2023
1 parent 128f222 commit 635ff8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_query_system/src/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ where
}
#[cfg(parallel_compiler)]
TryGetJob::JobCompleted(query_blocked_prof_timer) => {
let (v, index) = cache
.lookup(&key, |value, index| (value.clone(), index))
.unwrap_or_else(|_| panic!("value must be in cache after waiting"));
let Some((v, index)) = cache.lookup(&key) else {
panic!("value must be in cache after waiting")
};

if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) {
qcx.dep_context().profiler().query_cache_hit(index.into());
Expand Down

0 comments on commit 635ff8e

Please sign in to comment.