]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/mem_forget.txt
Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup
[rust.git] / src / tools / clippy / src / docs / mem_forget.txt
1 ### What it does
2 Checks for usage of `std::mem::forget(t)` where `t` is
3 `Drop`.
4
5 ### Why is this bad?
6 `std::mem::forget(t)` prevents `t` from running its
7 destructor, possibly causing leaks.
8
9 ### Example
10 ```
11 mem::forget(Rc::new(55))
12 ```