diff options
| author | bors <bors@rust-lang.org> | 2023-02-18 10:25:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-18 10:25:15 +0000 |
| commit | e1da00210a19817636e3e4c2ebe4844d0b704f61 (patch) | |
| tree | c9c4e6e366e8a02b55357eb9b63b46d2ea7c055e /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | 6444621c101151b49a5e7c9854d602483000e337 (diff) | |
| parent | 747f81ecd00a4b6daceb9d7e53c6790498196863 (diff) | |
| download | rust-e1da00210a19817636e3e4c2ebe4844d0b704f61.tar.gz rust-e1da00210a19817636e3e4c2ebe4844d0b704f61.zip | |
Auto merge of #10363 - c410-f3r:lock-1, r=xFrednet
[significant_drop_tightening] Ignore inexpensive statements
Not all statements that follow the last use of a lock guard are expensive and can therefore be ignored by the lint.
```rust
pub fn foo() -> i32 {
let mutex = Mutex::new(1);
let lock = mutex.lock().unwrap();
let rslt = *lock;
let another = rslt;
another
}
```
---
changelog: [`significant_drop_tightening`]: No longer lints for inexpensive statements after the lock guard
[#10363](https://github.com/rust-lang/rust-clippy/pull/10363)
<!-- changelog_checked -->
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
