Skip to content

Commit 5988723

Browse files
claudedan-starkware
authored andcommitted
Add clippy async-safety lints to catch Mutex held across .await
Add workspace-level clippy lints: - `await_holding_lock`: warns when a std::sync::Mutex (or RwLock) guard is held across an .await point, which can cause deadlocks or block the tokio runtime. - `await_holding_refcell_ref`: warns when a RefCell borrow is held across an .await point, which will panic if the future is polled from a different context. These lints pass cleanly on the existing codebase - all current std::sync::Mutex usage correctly drops guards before .await points. https://claude.ai/code/session_0133EbxcuGyrYJNCtfpKRjyR
1 parent d5d2195 commit 5988723

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,3 +426,5 @@ unexpected_cfgs = { level = "warn", check-cfg = [
426426

427427
[workspace.lints.clippy]
428428
as_conversions = "warn"
429+
await_holding_lock = "warn"
430+
await_holding_refcell_ref = "warn"

0 commit comments

Comments
 (0)