]> git.lizzy.rs Git - rust.git/blob - src/docs/clone_on_copy.txt
99a0bdb4c4ac0f668c16d2e650b66af7289c4b07
[rust.git] / 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 ```