-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Make the deadlock panic clearly refer to a deadlock #115668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @jackh726 (rustbot has picked a reviewer for you, use r? to override) |
if !found_cycle { | ||
panic!("deadlock detected"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !found_cycle { | |
panic!("deadlock detected"); | |
} | |
assert!(found_cycle, "deadlock detected"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with panic!
for the cleaner error message here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6546fb921d5da013fea2262e8ed17427
Assert seems to give the same message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably confused it with the assert_eq!
variants which does have the assertion failed
prefix. I prefer the explicit if
as the message doesn't directly describe the assertion condition anyway.
@bors r+ rollup |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ffe131f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 629.717s -> 629.667s (-0.01%) |
No description provided.