We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd6bb1a commit d459767Copy full SHA for d459767
lightning/src/sync/debug_sync.rs
@@ -135,7 +135,12 @@ impl LockMetadata {
135
// instances of the same lock. Still, doing so is quite risky, a total order
136
// must be maintained, and doing so across a set of otherwise-identical mutexes
137
// is fraught with issues.
138
- debug_assert!(cfg!(feature = "backtrace") && double_lock_self_allowed, "Tried to acquire a lock while it was held!");
+ #[cfg(feature = "backtrace")]
139
+ debug_assert!(double_lock_self_allowed,
140
+ "Tried to acquire a lock while it was held!\nLock constructed at {}",
141
+ get_construction_location(&this._lock_construction_bt));
142
+ #[cfg(not(feature = "backtrace"))]
143
+ panic!("Tried to acquire a lock while it was held!");
144
}
145
146
for (locked_idx, locked) in held.borrow().iter() {
0 commit comments