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 let_underscore_untyped #10356

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Conversation

JirkaVebr
Copy link
Contributor

Fixes #6842

This adds a new pedantic let_underscore_untyped lint which checks for let _ = <expr>, and suggests to either provide a type annotation, or to remove the let keyword. That way the author is forced to specify the type they intended to ignore, and thus get forced to re-visit the decision should the type of <expr> change. Alternatively, they can drop the let keyword to truly just ignore the value no matter what.

r? @llogiq

changelog: New lint: [let_underscore_untyped]

@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @llogiq (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 Feb 16, 2023
@llogiq
Copy link
Contributor

llogiq commented Feb 16, 2023

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

📌 Commit 0b1ae20 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

⌛ Testing commit 0b1ae20 with merge 99d4ea4...

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

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

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.

Warn about blanket let _ =
4 participants