diff options
| author | bors <bors@rust-lang.org> | 2020-11-09 19:13:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-09 19:13:26 +0000 |
| commit | dd826b4626c00da53f76f00f02f03556803e9cdb (patch) | |
| tree | fcaba54948cd5788ba2547c8daf4bde005ee8f05 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | d212c382c3d00b8a2bb701313c7bdd605ea7e128 (diff) | |
| parent | 4852cca61bb989adf77b1d202eae6b40067fa9ab (diff) | |
| download | rust-dd826b4626c00da53f76f00f02f03556803e9cdb.tar.gz rust-dd826b4626c00da53f76f00f02f03556803e9cdb.zip | |
Auto merge of #6305 - smoelius:master, r=flip1995
Add `let_underscore_drop`
This line generalizes `let_underscore_lock` (#5101) to warn about any initializer expression that implements `Drop`.
So, for example, the following would generate a warning:
```rust
struct Droppable;
impl Drop for Droppable {
fn drop(&mut self) {}
}
let _ = Droppable;
```
I tried to preserve the original `let_underscore_lock` functionality in the sense that the warning generated for
```rust
let _ = mutex.lock();
```
should be unchanged.
*Please keep the line below*
changelog: Add lint [`let_underscore_drop`]
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
