Skip to content

Commit dd0004a

Browse files
committed
Don't panic when waiting on poisoned queries
1 parent 5257aee commit dd0004a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@ where
285285
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();
286286

287287
match lock.get(&key) {
288-
Some(QueryResult::Poisoned) => {
289-
panic!("query '{}' not cached due to poisoning", query.name())
290-
}
288+
// The query we waited on panicked. Continue unwinding here.
289+
Some(QueryResult::Poisoned) => FatalError.raise(),
291290
_ => panic!(
292291
"query '{}' result must be in the cache or the query must be poisoned after a wait",
293292
query.name()

0 commit comments

Comments
 (0)