]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/clone_on_copy.txt
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
[rust.git] / src / tools / clippy / src / docs / clone_on_copy.txt
1 ### What it does
2 Checks for usage of `.clone()` on a `Copy` type.
3
4 ### Why is this bad?
5 The only reason `Copy` types implement `Clone` is for
6 generics, not for using the `clone` method on a concrete type.
7
8 ### Example
9 ```
10 42u64.clone();
11 ```