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

Improve let_underscore_lock #119710

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Improve let_underscore_lock #119710

merged 1 commit into from
Jan 22, 2024

Conversation

Noratrieb
Copy link
Member

  • lint if the lock was in a nested pattern
  • lint if the lock is inside a Result<Lock, _>

addresses #119704 (comment)

@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2024

r? @TaKO8Ki

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 7, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 9, 2024

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

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Jan 12, 2024

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2024
@rust-log-analyzer

This comment has been minimized.

- lint if the lock was in a nested pattern
- lint if the lock is inside a `Result<Lock, _>`
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@Noratrieb Noratrieb added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 12, 2024
@TaKO8Ki
Copy link
Member

TaKO8Ki commented Jan 21, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 21, 2024

📌 Commit a04ac49 has been approved by TaKO8Ki

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#118714 ( Explanation that fields are being used when deriving `(Partial)Ord` on enums)
 - rust-lang#119710 (Improve `let_underscore_lock`)
 - rust-lang#119726 (Tweak Library Integer Division Docs)
 - rust-lang#119746 (rustdoc: hide modals when resizing the sidebar)
 - rust-lang#119986 (Fix error counting)
 - rust-lang#120194 (Shorten `#[must_use]` Diagnostic Message for `Option::is_none`)
 - rust-lang#120200 (Correct the anchor of an URL in an error message)
 - rust-lang#120203 (Replace `#!/bin/bash` with `#!/usr/bin/env bash` in rust-installer tests)
 - rust-lang#120212 (Give nnethercote more reviews)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 72dddea into rust-lang:master Jan 22, 2024
11 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2024
Rollup merge of rust-lang#119710 - Nilstrieb:let-_-=-oops, r=TaKO8Ki

Improve `let_underscore_lock`

- lint if the lock was in a nested pattern
- lint if the lock is inside a `Result<Lock, _>`

addresses rust-lang#119704 (comment)
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 25, 2024
Improve `let_underscore_lock`

- lint if the lock was in a nested pattern
- lint if the lock is inside a `Result<Lock, _>`

addresses rust-lang#119704 (comment)
Akida31 added a commit to Akida31/swww that referenced this pull request Feb 9, 2024
[Recently][1] the [fix_underscore_lock][2] lint was improved and throws
now (as of the upcoming rust 1.77) an error.
Therefore I created separate methods for locking only `WallpaperInner`.

An alternative could be that the `_` is converted to `_temp` and then
the next statement could be `drop(_temp)` to stay with the current
behaviour but silence the lint.

[1]: rust-lang/rust#119710
[2]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/let_underscore/static.LET_UNDERSCORE_LOCK.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants