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-23 14:37:17 +02:00
2020-10-23 14:37:17 +02:00
2020-10-02 23:21:24 +13:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-21 11:04:26 -04:00
2020-10-21 11:04:26 -04:00
2020-10-21 11:04:26 -04:00
2020-10-21 11:04:26 -04:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-24 14:08:53 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-10-14 18:19:26 +03:30
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02: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-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-10-11 22:04:59 +02:00
2020-10-11 22:04:59 +02:00
2020-10-12 23:38:31 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-19 17:36:48 +02:00
2020-10-19 17:36:48 +02:00
2020-10-19 17:36:48 +02:00
2020-10-19 17:36:48 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 21:37:50 +02:00
2020-10-09 21:37:50 +02:00
2020-10-09 20:23:03 +02:00
2020-10-09 20:23:03 +02:00
2020-09-10 17:47:07 +02:00
2020-10-19 09:53:35 -03:00
2020-10-19 09:53:35 -03:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-03 04:58:14 +02:00
2020-10-24 14:46:56 -03:00
2020-10-24 14:46:56 -03:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-24 11:35:05 +02:00
2020-10-24 11:35:05 +02:00
2020-10-24 11:35:05 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-10 17:47:07 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 12:45:29 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-07 11:48:06 +02:00
2020-10-07 11:48:06 +02:00
2020-10-07 11:48:06 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 12:45:29 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-10-11 22:04:59 +02:00
2020-10-11 22:28:55 +02:00
2020-10-13 11:31:13 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-10-14 22:16:48 +02:00
2020-10-14 22:16:48 +02:00
2020-10-19 09:53:35 -03:00
2020-10-19 09:53:35 -03:00
2020-10-19 09:53:35 -03:00
2020-09-10 17:47:07 +02:00
2020-09-10 15:23:38 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-10 17:47:07 +02:00
2020-10-21 21:21:11 -04:00
2020-10-21 21:21:11 -04:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-10-24 00:04:37 +02:00
2020-10-24 00:04:37 +02:00
2020-10-24 00:04:37 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-09 12:45:29 +02:00
2020-10-11 22:57:22 +09:00
2020-10-12 23:38:31 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-10 17:47:07 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00
2020-09-24 14:49:22 +02:00