Skip to content

workspace: add await_holding_lock and await_holding_refcell_ref clippy lints#12567

Merged
dan-starkware merged 1 commit intomain-v0.14.2from
clippy-async-safety-lints
Feb 15, 2026
Merged

workspace: add await_holding_lock and await_holding_refcell_ref clippy lints#12567
dan-starkware merged 1 commit intomain-v0.14.2from
clippy-async-safety-lints

Conversation

@dan-starkware
Copy link
Collaborator

@dan-starkware dan-starkware commented Feb 14, 2026

No description provided.

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
@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator Author

dan-starkware commented Feb 14, 2026

@github-actions
Copy link

Artifacts upload workflows:

@dan-starkware dan-starkware changed the title Add clippy async-safety lints to catch Mutex held across .await workspace: add await_holding_lock and await_holding_refcell_ref clippy lints Feb 14, 2026
@dan-starkware dan-starkware marked this pull request as ready for review February 14, 2026 19:07
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorimedini-starkware reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @matanl-starkware and @ShahakShama).

@dan-starkware dan-starkware added this pull request to the merge queue Feb 15, 2026
@dan-starkware dan-starkware removed the request for review from dorimedini-starkware February 15, 2026 20:01
Merged via the queue into main-v0.14.2 with commit ba1d3f6 Feb 15, 2026
28 of 30 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants