]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/src/docs/drop_non_drop.txt
New upstream version 1.65.0+dfsg1
[rustc.git] / src / tools / clippy / src / docs / drop_non_drop.txt
1 ### What it does
2 Checks for calls to `std::mem::drop` with a value that does not implement `Drop`.
3
4 ### Why is this bad?
5 Calling `std::mem::drop` is no different than dropping such a type. A different value may
6 have been intended.
7
8 ### Example
9 ```
10 struct Foo;
11 let x = Foo;
12 std::mem::drop(x);
13 ```