summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/clone_on_copy.txt
blob: 99a0bdb4c4ac0f668c16d2e650b66af7289c4b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
### What it does
Checks for usage of `.clone()` on a `Copy` type.

### Why is this bad?
The only reason `Copy` types implement `Clone` is for
generics, not for using the `clone` method on a concrete type.

### Example
```
42u64.clone();
```