-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Revert "PR #30130 Implement Clone
for more arrays"
#30247
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
Conversation
This reverts commit e22a64e. This caused a regression such that types like `[[u8; 256]; 4]` no longer implemented Clone. This previously worked due to Clone for `[T; N]` (N in 0 to 32) being implemented for T: Copy. Due to fixed size arrays not implementing Clone for sizes above 32, the new implementation requiring T: Clone would not allow `[[u8; 256]; 4]` to be Clone.
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
I want to be conservative, no unplanned regressions. |
cc @tbu- As the original author. |
Yea, revert this for the time being. Theoretically these arrays ought to implement |
I propose adding the relevant broken testcase to ease future refactoring efforts. |
@untitaker good idea, added test. |
1db1b67
to
0ca2a9e
Compare
Revert "PR #30130 Implement `Clone` for more arrays" This reverts commit e22a64e. This caused a regression such that types like `[[u8; 256]; 4]` no longer implemented Clone. This previously worked due to Clone for `[T; N]` (N in 0 to 32) being implemented for T: Copy. Due to fixed size arrays not implementing Clone for sizes above 32, the new implementation requiring T: Clone would not allow `[[u8; 256]; 4]` to be Clone. Fixes #30244 Due to changing back, this is technically a [breaking-change], albeit for a behavior that existed for a very short time.
Revert "PR #30130 Implement
Clone
for more arrays"This reverts commit e22a64e.
This caused a regression such that types like
[[u8; 256]; 4]
no longer implemented Clone. This previously worked due to Clone
for
[T; N]
(N in 0 to 32) being implemented for T: Copy.Due to fixed size arrays not implementing Clone for sizes above 32,
the new implementation requiring T: Clone would not allow
[[u8; 256]; 4]
to be Clone.Fixes #30244
Due to changing back, this is technically a [breaking-change],
albeit for a behavior that existed for a very short time.