Rollup merge of #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 https://github.com/rust-lang/rust/pull/119704#discussion_r1444044745
This commit is contained in:
Matthias Krüger 2024-01-22 07:56:41 +01:00 committed by GitHub
commit a417366d58

View File

@ -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`