Skip to content

Commit

Permalink
Rollup merge of rust-lang#119710 - Nilstrieb:let-_-=-oops, r=TaKO8Ki
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
matthiaskrgr authored Jan 22, 2024
2 parents 833cbd6 + 3b7ba1d commit a417366
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/ui/let_underscore_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn main() {
let _ = p_rw;
}

#[allow(let_underscore_lock)]
fn uplifted() {
// shouldn't lint std locks as they were uplifted as rustc's `let_underscore_lock`

Expand Down

0 comments on commit a417366

Please sign in to comment.