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

unused_self: Don't trigger if the method body contains todo!() #10166

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

sulami
Copy link
Contributor

@sulami sulami commented Jan 6, 2023

If the author is using todo!(), presumably they intend to use self at some point later, so we don't have a good basis to recommend factoring out to an associated function.

Fixes #10117.


changelog: Enhancement: [unused_self]: No longer lints, if the method body contains a todo!() call
#10166

If the author is using todo!(), presumably they intend to use self at
some point later, so we don't have a good basis to recommend factoring
out to an associated function.

Fixes rust-lang#10117.

changelog: Don't trigger [`unused_self`] if the method body contains a `todo!()` call
@rustbot
Copy link
Collaborator

rustbot commented Jan 6, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @giraffate (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 6, 2023
@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Jan 11, 2023

📌 Commit e443604 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 11, 2023

⌛ Testing commit e443604 with merge 15226f9...

@bors
Copy link
Collaborator

bors commented Jan 11, 2023

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

@bors bors merged commit 15226f9 into rust-lang:master Jan 11, 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.

unused_self unsexpected positive with #![allow(unused)]
4 participants