RS.CLIPPY.CLONE_ON_COPY
Using `clone` on a `Copy` type
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: clone_on_copy. Copyright ©2025 The Rust Team. All rights reserved.
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();