summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/mem_forget.txt
blob: a6888c48fc33b1aa69c3aa63d812e530d1193b6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
### What it does
Checks for usage of `std::mem::forget(t)` where `t` is
`Drop`.

### Why is this bad?
`std::mem::forget(t)` prevents `t` from running its
destructor, possibly causing leaks.

### Example
```
mem::forget(Rc::new(55))
```