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

Commit

Permalink
Don't panic when waiting on poisoned queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Mar 2, 2024
1 parent 5257aee commit dd0004a
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 dd0004a

Please sign in to comment.