Skip to content

Commit 635ff8e

Browse files
committed
Support parallel compiler.
1 parent 128f222 commit 635ff8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ where
404404
}
405405
#[cfg(parallel_compiler)]
406406
TryGetJob::JobCompleted(query_blocked_prof_timer) => {
407-
let (v, index) = cache
408-
.lookup(&key, |value, index| (value.clone(), index))
409-
.unwrap_or_else(|_| panic!("value must be in cache after waiting"));
407+
let Some((v, index)) = cache.lookup(&key) else {
408+
panic!("value must be in cache after waiting")
409+
};
410410

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

0 commit comments

Comments
 (0)