Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
Rollup merge of rust-lang#121913 - Zoxc:query-fix, r=compiler-errors
Browse files Browse the repository at this point in the history
Don't panic when waiting on poisoned queries

This fixes a bug introduced in rust-lang#119086.
  • Loading branch information
jhpratt authored Mar 5, 2024
2 parents 1938ec0 + dd0004a commit 0a6b60b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_query_system/src/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,8 @@ where
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();

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

0 comments on commit 0a6b60b

Please sign in to comment.