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 wildcard_let lint #12902

Closed
wants to merge 6 commits into from
Closed

Conversation

lolbinarycat
Copy link

@lolbinarycat lolbinarycat commented Jun 8, 2024

Fixes #4090

changelog: [wildcard_let]: new restriction lint to forbid use of let _

@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2024

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) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 8, 2024
@lolbinarycat lolbinarycat marked this pull request as draft June 8, 2024 00:53
@lolbinarycat lolbinarycat marked this pull request as ready for review June 8, 2024 02:00
Comment on lines +11 to +12
/// this may be used by crates that with to force `#[must_use]`
/// values to actually used, along with `#[forbid(unused_must_use)]`.
Copy link
Member

Choose a reason for hiding this comment

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

Is this use-case not already covered by let_underscore_must_use?

Copy link
Author

Choose a reason for hiding this comment

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

in the 5 years of #4090 being open, noone brought that lint up.

Copy link
Contributor

Choose a reason for hiding this comment

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

So I understand there is some overlap, but the wildcard_let lint is broader in scope, correct? In that case, the lint should at least check if the let_underscore_must_use lint would apply and avoid linting in that case to avoid double messages.

@bors
Copy link
Contributor

bors commented Jun 11, 2024

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

@xFrednet
Copy link
Member

xFrednet commented Jul 4, 2024

Hey @lolbinarycat , this is a ping from triage, since there hasn't been any activity in some time. Are you still planning to continue this implementation?

If you have any questions, you're always welcome to ask them in this PR or on Zulip.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 4, 2024
@lolbinarycat
Copy link
Author

@xFrednet not really, since the previously mentioned lint already covers it's usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lint: wildcard pattern in let
6 participants