-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
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
Remove TrustedRandomAccess specialization for Cloned<T: Copy> #57970
Remove TrustedRandomAccess specialization for Cloned<T: Copy> #57970
Conversation
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
578ece9
to
4706b5e
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
For incorrect Clone implementations, this exposes specialization.
4706b5e
to
fabd772
Compare
So if we decide to stick with the current logic, should we add a comment (+ test) to the code pointing towards this? |
Honestly, if I had a time machine, I'd make |
I agree, it does seem like an acceptable risk to expose the difference, only visible for incorrect Clone impls. |
We have an RFC about this - https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md. |
Oh okay. |
For incorrect Clone implementations, this exposes specialization.