Skip to content

Commit ffe131f

Browse files
committed
Auto merge of rust-lang#115668 - Zoxc:deadlock-msg, r=jackh726
Make the deadlock panic clearly refer to a deadlock
2 parents 0d0ad42 + 68ffa33 commit ffe131f

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_query_system/src/query

1 file changed

+3
-1
lines changed

compiler/rustc_query_system/src/query/job.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,9 @@ pub fn deadlock<D: DepKind>(query_map: QueryMap<D>, registry: &rayon_core::Regis
552552
// which in turn will wait on X causing a deadlock. We have a false dependency from
553553
// X to Y due to Rayon waiting and a true dependency from Y to X. The algorithm here
554554
// only considers the true dependency and won't detect a cycle.
555-
assert!(found_cycle);
555+
if !found_cycle {
556+
panic!("deadlock detected");
557+
}
556558

557559
// FIXME: Ensure this won't cause a deadlock before we return
558560
for waiter in wakelist.into_iter() {

0 commit comments

Comments
 (0)