Rollup merge of #121913 - Zoxc:query-fix, r=compiler-errors

Don't panic when waiting on poisoned queries

This fixes a bug introduced in https://github.com/rust-lang/rust/pull/119086.
This commit is contained in:
Matthias Krüger 2024-03-05 06:40:32 +01:00 committed by GitHub
commit c483e637f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()