Skip to content

Commit

Permalink
Rollup merge of #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 #119086.
  • Loading branch information
matthiaskrgr authored Mar 5, 2024
2 parents 20dde1e + dd0004a commit c483e63
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 c483e63

Please sign in to comment.