]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/mem_forget.txt
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
[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 ```