We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 128f222 commit 635ff8eCopy full SHA for 635ff8e
compiler/rustc_query_system/src/query/plumbing.rs
@@ -404,9 +404,9 @@ where
404
}
405
#[cfg(parallel_compiler)]
406
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"));
+ let Some((v, index)) = cache.lookup(&key) else {
+ panic!("value must be in cache after waiting")
+ };
410
411
if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) {
412
qcx.dep_context().profiler().query_cache_hit(index.into());
0 commit comments