danielhenrymantilla / rust-uninit

Read trait fixed to soundly work with uninitalized memory
MIT License
25 stars 2 forks source link

Correct `T: Copy` requirement with `Out<[T]>` and `AsOut` #30

Closed kupiakos closed 10 months ago

kupiakos commented 10 months ago

Contrary to what I had initially considered when designing the new API, [T] is never Copy because Copy: Clone: Sized. This makes many of the changed bounds, especially for AsOut on arrays, entirely incorrect.

I need to find an alternative to the T: Copy for AsOut and related methods due to this. <T: Copy, const N: usize> [T; N]: Copy, but this can't be true for [T] and never can be without a breaking change. Sad times for Copy.