We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following is legal and totally weird/useless
#[derive(Copy)] struct A; impl Clone for A { fn clone(&self) -> A { panic!("bla"); } } fn main() { let a = A; let b = a; let c = a.clone(); }
The text was updated successfully, but these errors were encountered:
It depends. Copy is usually shallow, while clone may copy data behind pointers – it's a deep copy.
To have both may be useful in some situations. Implementing clone by accident isn't terribly common, so I doubt the value proposition of such a lint.
Sorry, something went wrong.
It's rather rare, I agree.
No branches or pull requests
The following is legal and totally weird/useless
The text was updated successfully, but these errors were encountered: