Skip to content

Fix: no_effect_underscore_binding fires on ignored parameters of async fns #12323

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

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Fix: no_effect_underscore_binding fires on ignored parameters of async fns #12323

merged 2 commits into from
Feb 21, 2024

Conversation

not-elm
Copy link

@not-elm not-elm commented Feb 20, 2024

Fixes #12279
changelog: Fix [no_effect_underscore_binding])

The warning is no longer displayed when an underscore is given in the parameter name of an asynchronous function.

@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2024

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

@y21 y21 left a comment

Choose a reason for hiding this comment

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

Welcome to clippy!

The changes look good to me, but, while we're here, can you update the lint description to remove the "known problems" section, since this is outdated?

/// ### Known problems
/// Further usage of this variable is not checked, which can lead to false positives if it is
/// used later in the code.

#12172 started checking for usage

@not-elm
Copy link
Author

not-elm commented Feb 21, 2024

Deleted "Known problems" section.

@y21
Copy link
Member

y21 commented Feb 21, 2024

Thanks! Could you squash the first 3 commits? Then it's good to merge.
Also, FYI, I don't know if it's intentional but it looks like those commits aren't linked to your account and use a different name. It's not a problem for clippy, just want to make sure it's intentional

----
UPDATE: add async block into test.

FIX: no_effect

Fixed asynchronous function parameter names with underscores so that warnings are not displayed when underscores are added to parameter names

ADD: test case
The `Known problems` section was removed because it is old information.
@not-elm
Copy link
Author

not-elm commented Feb 21, 2024

Sorry for the confusion, but he is my alter ego, so no problem.

Also, I squashed 3 commits, please check them.

@y21
Copy link
Member

y21 commented Feb 21, 2024

Nice, thank you!

@bors r+

@bors
Copy link
Contributor

bors commented Feb 21, 2024

📌 Commit 672bd5e has been approved by y21

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Feb 21, 2024

⌛ Testing commit 672bd5e with merge 78f088b...

bors added a commit that referenced this pull request Feb 21, 2024
Fix: no_effect_underscore_binding fires on ignored parameters of async fns

Fixes #12279
changelog: Fix [`no_effect_underscore_binding`])

The warning is no longer displayed when an underscore is given in the parameter name of an asynchronous function.
@bors
Copy link
Contributor

bors commented Feb 21, 2024

💔 Test failed - checks-action_test

@y21
Copy link
Member

y21 commented Feb 21, 2024

@bors retry

@bors
Copy link
Contributor

bors commented Feb 21, 2024

⌛ Testing commit 672bd5e with merge a056ff3...

@bors
Copy link
Contributor

bors commented Feb 21, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: y21
Pushing a056ff3 to master...

@bors bors merged commit a056ff3 into rust-lang:master Feb 21, 2024
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.

no_effect_underscore_binding fires on ignored parameters of async fns
5 participants