Skip to content

new lint: [readonly_write_lock]#11210

Merged
bors merged 3 commits into
rust-lang:masterfrom
y21:readonly_write_lock
Jul 28, 2023
Merged

new lint: [readonly_write_lock]#11210
bors merged 3 commits into
rust-lang:masterfrom
y21:readonly_write_lock

Conversation

@y21

@y21 y21 commented Jul 22, 2023

Copy link
Copy Markdown
Member

Closes #8555

A new lint that catches RwLock::write calls to acquire a write lock only to read from it and not actually do any writes (mutations).

changelog: new lint: [readonly_write_lock]

@rustbot

rustbot commented Jul 22, 2023

Copy link
Copy Markdown
Collaborator

r? @giraffate

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 22, 2023
@bors

bors commented Jul 26, 2023

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #11115) made this pull request unmergeable. Please resolve the merge conflicts.

@giraffate giraffate left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall looks good, thanks! I made some comments.

Comment thread clippy_lints/src/methods/mod.rs Outdated
Comment thread clippy_lints/src/methods/readonly_write_lock.rs Outdated
y21 and others added 2 commits July 27, 2023 21:19
@y21 y21 force-pushed the readonly_write_lock branch from 4c4953e to 205a374 Compare July 27, 2023 19:20
@giraffate

Copy link
Copy Markdown
Contributor

@bors r+

Thanks!

@bors

bors commented Jul 28, 2023

Copy link
Copy Markdown
Contributor

📌 Commit 5e88003 has been approved by giraffate

It is now in the queue for this repository.

@bors

bors commented Jul 28, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5e88003 with merge d3c5b48...

@bors

bors commented Jul 28, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing d3c5b48 to master...

@y21

y21 commented Jul 28, 2023

Copy link
Copy Markdown
Member Author

uhh... did bors get stuck merging the PR or what happened here? 😅

@bors bors merged commit d3c5b48 into rust-lang:master Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RwLock: creating a write lock instead of a read lock

4 participants