about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-14 15:05:10 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-16 14:55:05 +0100
commitcaf29b27277fd4fca4b372938e2fecf12dd12c78 (patch)
tree11c77a3393bc7e561bb9781e5f7750ce89595891
parent1ae1eac7d23dec75c34a3f2be706d2f2146748f1 (diff)
downloadrust-caf29b27277fd4fca4b372938e2fecf12dd12c78.tar.gz
rust-caf29b27277fd4fca4b372938e2fecf12dd12c78.zip
Remove parallel compiler fix
-rw-r--r--compiler/rustc_query_system/src/query/plumbing.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs
index 38f507409c6..57217fb681a 100644
--- a/compiler/rustc_query_system/src/query/plumbing.rs
+++ b/compiler/rustc_query_system/src/query/plumbing.rs
@@ -257,10 +257,6 @@ where
         // Forget ourself so our destructor won't poison the query
         mem::forget(self);
 
-        // Mark as complete before we remove the job from the active state
-        // so no other thread can re-execute this query.
-        cache.complete(key.clone(), result, dep_node_index);
-
         let job = {
             #[cfg(parallel_compiler)]
             let mut lock = state.active.get_shard_by_value(&key).lock();
@@ -271,6 +267,7 @@ where
                 QueryResult::Poisoned => panic!(),
             }
         };
+        cache.complete(key, result, dep_node_index);
 
         job.signal_complete();
     }