Skip to content
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

Add ineffective_open_options lint #11902

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Dec 1, 2023

Fixes #9628.

For OpenOptions, in case you call both write(true) and append(true) on OpenOptions, then write(true) is actually useless since append(true) does it.

r? @flip1995

changelog: Add ineffective_open_options lint

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 1, 2023
@GuillaumeGomez GuillaumeGomez force-pushed the write-and-append branch 5 times, most recently from 27228c8 to 4e973bf Compare December 1, 2023 18:43
@GuillaumeGomez
Copy link
Member Author

r? @llogiq

@rustbot rustbot assigned llogiq and unassigned flip1995 Dec 10, 2023
@llogiq
Copy link
Contributor

llogiq commented Dec 10, 2023

I think the name should be similar enough to nonsensical_open_options. Perhaps ineffective_open_options?

@GuillaumeGomez
Copy link
Member Author

Renaming to ineffective_open_options then.

@GuillaumeGomez GuillaumeGomez changed the title Add write_and_append lint Add ineffective_open_options lint Dec 10, 2023
@rustbot rustbot assigned flip1995 and unassigned llogiq Dec 10, 2023
@GuillaumeGomez
Copy link
Member Author

Done!

@llogiq
Copy link
Contributor

llogiq commented Dec 12, 2023

Looks good to me. r=me after rebase.

@bors delegate+

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

✌️ @GuillaumeGomez, you can now approve this pull request!

If @llogiq told you to "r=me" after making some further change, please make that change, then do @bors r=@llogiq

@GuillaumeGomez
Copy link
Member Author

@bors r=llogiq

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

📌 Commit ded94ec has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

⌛ Testing commit ded94ec with merge 52deee2...

@bors
Copy link
Collaborator

bors commented Dec 12, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 52deee2 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Dec 12, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 52deee2 to master...

@bors bors merged commit 52deee2 into rust-lang:master Dec 12, 2023
8 checks passed
@GuillaumeGomez GuillaumeGomez deleted the write-and-append branch December 12, 2023 14:34
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.

New lint: clippy::no_write_and_append
5 participants