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

Extend unconditional_recursion lint to check for Default trait implementation #12090

Merged

Conversation

GuillaumeGomez
Copy link
Member

In case the Default trait is implemented manually and is calling a static method (let's call it a) and then a is using Self::default(), it makes an infinite call recursion difficult to see without debugging. This extension checks that there is no such recursion possible.

r? @llogiq

changelog: Extend unconditional_recursion lint to check for Default trait implementation

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 4, 2024
@GuillaumeGomez
Copy link
Member Author

Fixed the clippy lints.

@llogiq
Copy link
Contributor

llogiq commented Jan 4, 2024

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 4, 2024

📌 Commit bf5c0d8 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 4, 2024

⌛ Testing commit bf5c0d8 with merge 8507e4c...

@bors
Copy link
Collaborator

bors commented Jan 4, 2024

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

@bors bors merged commit 8507e4c into rust-lang:master Jan 4, 2024
5 checks passed
@GuillaumeGomez GuillaumeGomez deleted the default-unconditional-recursion branch January 5, 2024 10:35
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.

None yet

4 participants