diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-04 15:56:21 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-04 15:56:50 +0000 |
| commit | 635ff8e2a8ee1acc3bc5144606d9d12f9ac62d98 (patch) | |
| tree | a372114322c4f584c40fd477ddf41f7c4fd97a47 /compiler/rustc_query_system | |
| parent | 128f2224afa6bf135a674fc14e5c825f2c76c93f (diff) | |
Support parallel compiler.
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index bf380f6e2d3..ffc413d15f5 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -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()); |
