about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/common.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-09 12:44:23 +0000
committerbors <bors@rust-lang.org>2023-06-09 12:44:23 +0000
commitd7ad9d9797e595e9daed98c291a8eb6e4be838ff (patch)
tree6fe254364a22c6d35a5b45db60e8cab0d7fb78cf /compiler/rustc_codegen_gcc/src/common.rs
parent343ad6f0596fa3222f3168b74b3e8571066e77bb (diff)
parentd9d1c76ded359089e97b3bb30c5b26ffd5c17396 (diff)
downloadrust-d7ad9d9797e595e9daed98c291a8eb6e4be838ff.tar.gz
rust-d7ad9d9797e595e9daed98c291a8eb6e4be838ff.zip
Auto merge of #111530 - Urgau:uplift_undropped_manually_drops, r=compiler-errors
Uplift `clippy::undropped_manually_drops` lint

This PR aims at uplifting the `clippy::undropped_manually_drops` lint.

## `undropped_manually_drops`

(warn-by-default)

The `undropped_manually_drops` lint check for calls to `std::mem::drop` with a value of `std::mem::ManuallyDrop` which doesn't drop.

### Example

```rust
struct S;
drop(std::mem::ManuallyDrop::new(S));
```

### Explanation

`ManuallyDrop` does not drop it's inner value so calling `std::mem::drop` will not drop the inner value of the `ManuallyDrop` either.

-----

Mostly followed the instructions for uplifting an clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751

`@rustbot` label: +I-lang-nominated
r? compiler

-----

For Clippy:

changelog: Moves: Uplifted `clippy::undropped_manually_drops` into rustc
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
0 files changed, 0 insertions, 0 deletions