Skip to content

Commit fc561f0

Browse files
committed
Unwrap the other query result
(I can't build right now so this may not actually be correct)
1 parent 95f3a7d commit fc561f0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,10 @@ where
282282
// We didn't find the query result in the query cache. Check if it was
283283
// poisoned due to a panic instead.
284284
let lock = query.query_state(qcx).active.get_shard_by_value(&key).lock();
285-
match lock.get(&key) {
286-
// The query we waited on panicked. Continue unwinding here.
287-
Some(QueryResult::Poisoned) => FatalError.raise(),
288-
_ => panic!(
289-
"query result must in the cache or the query must be poisoned after a wait"
290-
),
291-
}
285+
lock.get(&key).unwrap();
286+
panic!(
287+
"query result must in the cache or the query must be poisoned after a wait"
288+
);
292289
})
293290
};
294291

0 commit comments

Comments
 (0)