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

no_effect_underscore_binding: _ prefixed variables can be used #12172

Merged
merged 1 commit into from Jan 21, 2024

Conversation

samueltardieu
Copy link
Contributor

Prefixing a variable with a _ does not mean that it will not be used. If such a variable is used later, do not warn about the fact that its initialization does not have a side effect as this is fine.

changelog: [no_effect_underscore_binding]: warn only if variable is unused

Fix #12166

@rustbot
Copy link
Collaborator

rustbot commented Jan 18, 2024

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 18, 2024
@bors
Copy link
Collaborator

bors commented Jan 19, 2024

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

Prefixing a variable with a `_` does not mean that it will not be used.
If such a variable is used later, do not warn about the fact that its
initialization does not have a side effect as this is fine.
@Alexendoo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 21, 2024

📌 Commit 6267b6c has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 21, 2024

⌛ Testing commit 6267b6c with merge 7386856...

@bors
Copy link
Collaborator

bors commented Jan 21, 2024

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

@bors bors merged commit 7386856 into rust-lang:master Jan 21, 2024
5 checks passed
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 false positive for Rocket routes
4 participants