bors 6b01c39e64 Auto merge of #6181 - cgm616:undropped-manually-drops, r=flip1995
Add new lint for undropped ManuallyDrop values

Adds a new lint for the following code:

```rust
struct S;

impl Drop for S {
    fn drop(&mut self) {
        println!("drip drop");
    }
}

fn main() {
    // This will not drop the `S`!!!
    drop(std::mem::ManuallyDrop::new(S));
    unsafe {
        // This will.
        std::mem::ManuallyDrop::drop(&mut std::mem::ManuallyDrop::new(S));
    }
}
```

The inner value of a `ManuallyDrop` will not be dropped unless the proper, unsafe drop function is called on it. This lint makes sure that a user does not accidently use the wrong function and forget to drop a `ManuallyDrop` value.

Fixes #5581.

---

*Please keep the line below*
changelog: none
2020-10-25 09:37:09 +00:00
..
2020-10-02 23:21:24 +13:00
2020-10-02 11:34:14 -07:00
2020-10-02 11:34:14 -07:00
2020-10-11 22:04:59 +02:00
2020-10-11 22:04:59 +02:00
2020-10-11 22:04:59 +02:00
2020-10-11 22:04:59 +02:00
2020-10-14 22:16:48 +02:00
2020-09-10 15:23:38 +02:00